File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -41,13 +41,18 @@ export class RepModule extends Module {
41
41
const GIVE = '✅' ;
42
42
const PARTIAL_GIVE = '🤔' ;
43
43
const NO_GIVE = '❌' ;
44
+ const LAUGH = '😆' ;
44
45
45
46
// Check for thanks messages
46
47
const isThanks = this . THANKS_REGEX . test ( msg . content ) ;
47
48
48
49
if ( msg . author . bot || ! isThanks || ! msg . guild ) return ;
49
50
50
- const mentionUsers = msg . mentions . users ;
51
+ const allMentionUsers = msg . mentions . users ;
52
+ const mentionUsers = allMentionUsers . filter (
53
+ user => user . id !== msg . member ?. id ,
54
+ ) ;
55
+ if ( mentionUsers . size < allMentionUsers . size ) await msg . react ( LAUGH ) ;
51
56
if ( ! mentionUsers . size ) return ;
52
57
53
58
const senderRU = await this . getOrMakeUser ( msg . author ) ;
@@ -58,7 +63,6 @@ export class RepModule extends Module {
58
63
if ( currentSent >= this . MAX_REP ) return await msg . react ( NO_GIVE ) ;
59
64
60
65
for ( const user of mentionUsers . values ( ) ) {
61
- if ( user . id === msg . member ?. id ) continue ;
62
66
if ( currentSent >= this . MAX_REP )
63
67
return await msg . react ( PARTIAL_GIVE ) ;
64
68
You can’t perform that action at this time.
0 commit comments