File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/main/java/net/javadiscord/javabot/systems/moderation Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -227,8 +227,12 @@ public boolean hasSuspiciousLink(@NotNull Message message) {
227
227
public boolean hasAdvertisingLink (@ NotNull Message message ) {
228
228
// Advertising
229
229
Matcher matcher = INVITE_URL .matcher (cleanString (message .getContentRaw ()));
230
- if (matcher .find ()) {
231
- return Bot .getConfig ().get (message .getGuild ()).getModerationConfig ().getAutomodInviteExcludes ().stream ().noneMatch (message .getContentRaw ()::contains );
230
+ int start = 0 ;
231
+ while (matcher .find (start )) {
232
+ if (Bot .getConfig ().get (message .getGuild ()).getModerationConfig ().getAutomodInviteExcludes ().stream ().noneMatch (matcher .group ()::contains )) {
233
+ return true ;
234
+ }
235
+ start = matcher .start () + 1 ;
232
236
}
233
237
return false ;
234
238
}
You can’t perform that action at this time.
0 commit comments