Skip to content

Commit ae28da7

Browse files
committed
Update WordBlacklistModule.java
1 parent 9a5346e commit ae28da7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/main/java/me/TechsCode/TechDiscordBot/module/modules/WordBlacklistModule.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class WordBlacklistModule extends Module {
3030
@Override
3131
protected Query<Category> newQuery() {
3232
//return bot.getCategories("\uD83D\uDCC1 | Archives", "\uD83D\uDCD1 | Staff Logs", "Other Staff Discussions", "staff discussions", "⚖ | Leadership-Discussions"); //Category for Official Use
33-
return bot.getCategories("\uD83D\uDCAC | Community Talk", "\uD83D\uDCAC | General Discussions", "\uD83D\uDCE6︱Free Plugin Support", "\uD83D\uDCE6︱Paid Plugin Support", "⚖ | Leadership-Discussions", "Staff Discussions"); //Category for Testubg
33+
return bot.getCategories("\uD83D\uDCAC | Community Talk", "\uD83D\uDCAC | General Discussions", "\uD83D\uDCE6︱Free Plugin Support", "\uD83D\uDCE6︱Paid Plugin Support", "⚖ | Leadership-Discussions", "Staff Discussions"); //Category for Testuse
3434
}
3535
};
3636

@@ -91,8 +91,15 @@ public boolean runMatcher(String message){
9191
AtomicBoolean blockMessage = new AtomicBoolean(false);
9292
for (String regex : BLACKLISTED_WORDS) {
9393
Matcher matcher = Pattern.compile(regex, Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL).matcher(message);
94+
95+
TechDiscordBot.log(message);
96+
TechDiscordBot.log("matches: "+matcher.matches());
97+
TechDiscordBot.log("find: "+matcher.find());
98+
TechDiscordBot.log(regex);
99+
94100
boolean match = matcher.find();
95101
if (match) {
102+
TechDiscordBot.log(matcher.group(1));
96103
blockMessage.set(true);
97104
break;
98105
}

0 commit comments

Comments
 (0)