1 | svoid dm_discord_gatherFeedbackFromLine(GazelleLine l) pcall {
|
2 | S mrStruct = gazelle_discord_matchedRuleStructForMsgID(l.msgID); |
3 | if (mrStruct == null) ret; // with print("Not a Gazelle line or legacy");
|
4 | print("Processing: " + l.msgID + " - " + l.text);
|
5 | printIndent(shorten(mrStruct, 50)); |
6 | printIndent(l.reactions); |
7 | LS posNeg = uniquifyCI(map dm_posNegStringForEmoji(collectStrings emoji(l.reactions))); |
8 | printIndent("posNeg = " + posNeg);
|
9 | if (l(posNeg) > 1) ret with warn(" Mixed feedback, skipping");
|
10 | S judgement = cic(posNeg, 'positive) ? 'good : 'bad; |
11 | dm_gazelle_saveAppliedRule( |
12 | +judgement, |
13 | matchedRuleStruct := mrStruct, |
14 | context := "discord msg " + l.msgID); |
15 | } |
Began life as a copy of #1021709
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1021726 |
| Snippet name: | dm_discord_gatherFeedbackFromLine |
| Eternal ID of this version: | #1021726/4 |
| Text MD5: | 2c4899be2f7faf35bb274a27f3a4bb44 |
| Author: | stefan |
| Category: | javax / discord / a.i. |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-06-29 21:41:09 |
| Source code size: | 710 bytes / 15 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 571 / 635 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |