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

This commit is contained in:
Seaswimmer 2024-06-03 01:10:00 -04:00
parent 66b933569b
commit 2ac1dacd19
Signed by untrusted user: cswimr
GPG key ID: 5D671B5D03D65A7F

View file

@ -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