From 7fdb106fad831a218acd4cad3965d39077a708f3 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Wed, 31 Jan 2024 13:22:56 -0500 Subject: [PATCH] misc(backup): condensed some code more --- backup/backup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backup/backup.py b/backup/backup.py index 70dd513..a843726 100644 --- a/backup/backup.py +++ b/backup/backup.py @@ -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