From 26b085231b99740cb76842a8b7ee64f389e08cb5 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Wed, 31 Jan 2024 12:38:47 -0500 Subject: [PATCH] fix(backup): fixed list out of index error --- backup/backup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backup/backup.py b/backup/backup.py index c2066a4..4cbc618 100644 --- a/backup/backup.py +++ b/backup/backup.py @@ -61,7 +61,7 @@ class Backup(commands.Cog): async def backup_import(self, ctx: commands.Context, json: str = None): """Import your installed repositories and cogs from an export.""" if json is None: - if ctx.message.attachments is not None: + if not len(ctx.message.attachments) == 0: json = await ctx.message.attachments[0].read() else: await ctx.send(error("Please provide a valid JSON export."))