aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar scragly <[email protected]>2020-03-09 16:50:57 +1000
committerGravatar GitHub <[email protected]>2020-03-09 16:50:57 +1000
commit537f8e73c2819b67b9707555a7b893168ac3cbee (patch)
tree19d03397928f091ccc926a74c42dc5d7fe5b4e56
parentImplement vote command. (diff)
parentMerge pull request #824 from python-discord/antimalware-fix (diff)
Merge branch 'master' into vote
-rw-r--r--bot/cogs/antimalware.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/cogs/antimalware.py b/bot/cogs/antimalware.py
index 373619895..79bf486a4 100644
--- a/bot/cogs/antimalware.py
+++ b/bot/cogs/antimalware.py
@@ -29,8 +29,9 @@ class AntiMalware(Cog):
return
embed = Embed()
- file_extensions = {splitext(message.filename.lower())[1] for message in message.attachments}
+ file_extensions = {splitext(attachment.filename.lower())[1] for attachment in message.attachments}
extensions_blocked = file_extensions - set(AntiMalwareConfig.whitelist)
+ blocked_extensions_str = ', '.join(extensions_blocked)
if ".py" in extensions_blocked:
# Short-circuit on *.py files to provide a pastebin link
embed.description = (
@@ -38,7 +39,6 @@ class AntiMalware(Cog):
f"please use a code-pasting service such as {URLs.site_schema}{URLs.site_paste}"
)
elif extensions_blocked:
- blocked_extensions_str = ', '.join(extensions_blocked)
whitelisted_types = ', '.join(AntiMalwareConfig.whitelist)
meta_channel = self.bot.get_channel(Channels.meta)
embed.description = (