From 2ac1dacd19af043ab643b325f83707328dc0273d Mon Sep 17 00:00:00 2001 From: Seaswimmer Date: Mon, 3 Jun 2024 01:10:00 -0400 Subject: [PATCH] fix(backup): added another error type caught by backup import, in the case where you didn't reply to a message or upload a file --- backup/backup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backup/backup.py b/backup/backup.py index 7fe9b4d..6202e3a 100644 --- a/backup/backup.py +++ b/backup/backup.py @@ -100,7 +100,7 @@ class Backup(commands.Cog): except (json.JSONDecodeError, IndexError): try: export = json.loads(await ctx.message.reference.resolved.attachments[0].read()) - except (json.JSONDecodeError, IndexError): + except (json.JSONDecodeError, IndexError, AttributeError): await ctx.send(error("Please provide a valid JSON export file.")) return