mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-22 02:37:57 -05:00
[Mod] Account for duplicated mentions (#4359)
* Account for duplicated mentions * Spelling fix + Wording change * Requested changes *hopefully* * forgot to formattttttttttttttttttttttt * Improve the consistency with existing commands in inconsistent `[p]modset` group * What was the point of defining `guild` if you didn't end up using it, Jack!? * I hate you, web editor ಠ益ಠ * You could have just copy-pasted this Jack, seriously... Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
@@ -45,7 +45,11 @@ class Events(MixinMeta):
|
||||
guild, author = message.guild, message.author
|
||||
mention_spam = await self.config.guild(guild).mention_spam.all()
|
||||
|
||||
mentions = set(message.mentions)
|
||||
if mention_spam["strict"]: # if strict is enabled
|
||||
mentions = message.raw_mentions
|
||||
else: # if not enabled
|
||||
mentions = set(message.mentions)
|
||||
|
||||
if mention_spam["ban"]:
|
||||
if len(mentions) >= mention_spam["ban"]:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user