From 20ba6fed8844394d816c2712700553cff213af2e Mon Sep 17 00:00:00 2001 From: Pempkin Date: Wed, 17 Feb 2021 03:50:33 -0600 Subject: [PATCH] more exclusions to binflop uploads --- .gitignore | 2 ++ bot.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b6e4761..019f836 100644 --- a/.gitignore +++ b/.gitignore @@ -127,3 +127,5 @@ dmypy.json # Pyre type checker .pyre/ + +/.idea/* \ No newline at end of file diff --git a/bot.py b/bot.py index 2e116f1..fe4f0ed 100644 --- a/bot.py +++ b/bot.py @@ -35,7 +35,7 @@ async def on_message(message): # Binflop if len(message.attachments) > 0: if not message.attachments[0].url.endswith( - ('.png', '.jpg', '.jpeg', '.mp4', '.mov', '.avi', '.gif', '.image', '.svg')): + ('.png', '.jpg', '.jpeg', '.mp4', '.mov', '.avi', '.gif', '.image', '.svg', '.jar', ',zip', '.tar', '.gz', '.msi', '.exe', '.html')): text = await discord.Attachment.read(message.attachments[0], use_cached=False) text = text.decode('Latin-1') text = "\n".join(text.splitlines())