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
All checks were successful
Actions / Build Documentation (MkDocs) (push) Successful in 43s
Actions / Lint Code (Ruff & Pylint) (push) Successful in 1m9s

This commit is contained in:
Seaswimmer 2024-06-03 01:10:00 -04:00
parent 66b933569b
commit 2ac1dacd19
Signed by: Seaswimmer
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