From 702de214484614a41dd206716bfc7ee4ba78e0a6 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Wed, 31 Jan 2024 13:03:02 -0500 Subject: [PATCH] fix(backup): added a kwarg to backup_import --- backup/backup.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/backup/backup.py b/backup/backup.py index c774b95..bc2ef0b 100644 --- a/backup/backup.py +++ b/backup/backup.py @@ -58,11 +58,10 @@ class Backup(commands.Cog): @backup.command(name='import') @commands.is_owner() - async def backup_import(self, ctx: commands.Context, export: str = None): + async def backup_import(self, ctx: commands.Context, *, export: str = None): """Import your installed repositories and cogs from an export.""" - if export is None: - if not len(ctx.message.attachments) == 0: - export = await ctx.message.attachments[0].read() + if export is None and not len(ctx.message.attachments) == 0: + export = await ctx.message.attachments[0].read() try: export = json.loads(export) except json.JSONDecodeError: