Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

20
LINES

< > BotCompany Repo | #1021706 // dm_discord_grabEmojiJudgementsFromChat

JavaX fragment (include)

svoid dm_discord_grabEmojiJudgementsFromChat() {
  MultiMap<S> mm = dm_discord_emojiJudgementsFromChat();
  mm.addAll(dm_discord_emojiJudgementsFromChat2());
  for (S emoji : keys(mm)) {
    LS judgements = mm.get(emoji);
    if (l(judgements) > 1) continue with warn("Multiple judgements for " + emoji);
    S judgement = first(judgements);
    S old = dm_posNegStringForEmoji(emoji);
    S keywords = dm_keywordsForEmoji(emoji);
    S desc = emoji + " (" + or2(keywords, "?") + ")";
    if (nempty(old) && neqic(old, judgement))
      continue with warn("Differing judgement for " + desc);
    if (eqic(old, judgement))
      print("Keeping judgement for " + desc + " (" + judgement + ")");
    else {
      print("Setting judgement for " + desc + " to: " + judgement);
      dm_setPosNegStringForEmoji(emoji, judgement);
    }
  }
}

Author comment

Began life as a copy of #1021705

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, whxojlpjdney

No comments. add comment

Snippet ID: #1021706
Snippet name: dm_discord_grabEmojiJudgementsFromChat
Eternal ID of this version: #1021706/5
Text MD5: f9d226246e3a30986a67d8ccdcdfec48
Author: stefan
Category: javax / discord
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-02-24 19:06:51
Source code size: 854 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 242 / 273
Version history: 4 change(s)
Referenced in: [show references]