Backup #16

Merged
cswimr merged 41 commits from backup into main 2024-01-31 15:58:08 -05:00
Showing only changes of commit 7fdb106fad - Show all commits

View file

@ -62,8 +62,7 @@ class Backup(commands.Cog):
async def backup_import(self, ctx: commands.Context):
"""Import your installed repositories and cogs from an export file."""
try:
export_raw = await ctx.message.attachments[0].read()
export = json.loads(export_raw)
export = json.loads(await ctx.message.attachments[0].read())
except (json.JSONDecodeError, IndexError):
await ctx.send(error("Please provide a valid JSON export file."))
return