Break on rate limit instead of continue so it doesn't spam multiple rate limit messages if multiple regexes match

This commit is contained in:
barelyprofessional
2026-02-06 23:30:07 -06:00
parent 7179cf72ce
commit 57e1f7eb04

View File

@@ -107,7 +107,7 @@ internal class BotCommands
if (isRateLimited.IsRateLimited)
{
_ = SendCooldownResponse(user, command.RateLimitOptions, isRateLimited.OldestEntryExpires!.Value, command.GetType().Name);
continue;
break;
}
RateLimitService.AddEntry(user, command, message.MessageRawHtmlDecoded);
}