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

15
LINES

< > BotCompany Repo | #1021716 // dm_discord_emojiJudgementsFromChat2 (from reactions, dev.)

JavaX fragment (include)

1  
static MultiMap<S> dm_discord_emojiJudgementsFromChat2() {
2  
  new MultiMap<S> mm;
3  
  new Matches m;
4  
  for (GazelleLine line : dm_discord_allLinesWithReactions())
5  
    if (jmatch("is * a positive or negative emoji?", tok_joinExtendedUnicodes(javaTok(line.text)), m)) {
6  
      S emoji = $1;
7  
      print("emoji: " + emoji + " (" + dm_keywordsForEmoji(emoji) + ")");
8  
      for (GazelleReaction r : line.reactions) {
9  
        S judgement = dm_posNegStringForEmoji(r.emoji);
10  
        if (empty(judgement)) continue with warn("  Unknown reaction: " + r.emoji + " (" + dm_keywordsForEmoji(r.emoji) + ")");
11  
          mm.put(emoji, judgement);
12  
      }
13  
    }
14  
  ret mm;
15  
}

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: #1021716
Snippet name: dm_discord_emojiJudgementsFromChat2 (from reactions, dev.)
Eternal ID of this version: #1021716/6
Text MD5: 27a487e67109ad5268e3fa5e881288eb
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:04:55
Source code size: 667 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 285 / 320
Version history: 5 change(s)
Referenced in: [show references]