From d60e7f0542583fa07645f458a46fcb75794e3cf5 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 31 Aug 2021 22:46:04 +0200 Subject: [PATCH] fddf --- files/helpers/images.py | 3 ++- files/routes/discord.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/files/helpers/images.py b/files/helpers/images.py index 172091c1b..7f8869ec3 100644 --- a/files/helpers/images.py +++ b/files/helpers/images.py @@ -29,7 +29,8 @@ def upload_file(file=None, resize=False, png=False): om = next(frames) om.info = i.info - om.save("image.gif", save_all=True, append_images=list(frames), loop=0) + try: om.save("image.gif", save_all=True, append_images=list(frames), loop=0) + except: return(None) if png: filedir = "image.png" else: filedir = "image.gif" diff --git a/files/routes/discord.py b/files/routes/discord.py index c829b35af..3eda9ee73 100644 --- a/files/routes/discord.py +++ b/files/routes/discord.py @@ -16,6 +16,7 @@ WELCOME_CHANNEL="846509313941700618" def join_discord(v): if v.is_banned != 0: return "You're banned" + if 'rdrama' in request.host and v.admin_level == 0 and v.patron == 0 and v.coins < 150: return f"You must earn 150 {COINS_NAME} before entering the Discord server. You earn {COINS_NAME} by making posts/comments and getting upvoted." now=int(time.time())