We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 96c3e89 commit cd75db6Copy full SHA for cd75db6
application/src/main/java/org/togetherjava/tjbot/features/moderation/scam/ScamBlocker.java
@@ -130,7 +130,11 @@ public void onMessageReceived(MessageReceivedEvent event) {
130
return;
131
}
132
133
- boolean isSafe = !isBotTrapChannel.test(event.getChannel().asTextChannel());
+ boolean isSafe = true;
134
+ if (event.getChannel() instanceof TextChannel textChannel
135
+ && isBotTrapChannel.test(textChannel)) {
136
+ isSafe = false;
137
+ }
138
139
Message message = event.getMessage();
140
String content = message.getContentDisplay();
0 commit comments