File tree 1 file changed +1
-42
lines changed
packages/client-discord/src
1 file changed +1
-42
lines changed Original file line number Diff line number Diff line change @@ -687,47 +687,6 @@ export class MessageManager {
687
687
) ;
688
688
}
689
689
690
- private _isMessageForMe ( message : DiscordMessage ) : boolean {
691
- const isMentioned = message . mentions . users ?. has (
692
- this . client . user ?. id as string
693
- ) ;
694
- const guild = message . guild ;
695
- const member = guild ?. members . cache . get ( this . client . user ?. id as string ) ;
696
- const nickname = member ?. nickname ;
697
-
698
- // Don't consider role mentions as direct mentions
699
- const hasRoleMentionOnly =
700
- message . mentions . roles . size > 0 && ! isMentioned ;
701
-
702
- // If it's only a role mention and we're in team mode, let team logic handle it
703
- if (
704
- hasRoleMentionOnly &&
705
- this . runtime . character . clientConfig ?. discord ?. isPartOfTeam
706
- ) {
707
- return false ;
708
- }
709
-
710
- return (
711
- isMentioned ||
712
- ( ! this . runtime . character . clientConfig ?. discord
713
- ?. shouldRespondOnlyToMentions &&
714
- ( message . content
715
- . toLowerCase ( )
716
- . includes (
717
- this . client . user ?. username . toLowerCase ( ) as string
718
- ) ||
719
- message . content
720
- . toLowerCase ( )
721
- . includes (
722
- this . client . user ?. tag . toLowerCase ( ) as string
723
- ) ||
724
- ( nickname &&
725
- message . content
726
- . toLowerCase ( )
727
- . includes ( nickname . toLowerCase ( ) ) ) ) )
728
- ) ;
729
- }
730
-
731
690
private async _analyzeContextSimilarity (
732
691
currentMessage : string ,
733
692
previousContext ?: MessageContext ,
@@ -1218,7 +1177,7 @@ export class MessageManager {
1218
1177
return false ;
1219
1178
}
1220
1179
}
1221
-
1180
+
1222
1181
if ( message . mentions . has ( this . client . user ?. id as string ) ) return true ;
1223
1182
1224
1183
const guild = message . guild ;
You can’t perform that action at this time.
0 commit comments