Backup #16

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

View file

@ -61,7 +61,7 @@ class Backup(commands.Cog):
async def backup_import(self, ctx: commands.Context, json: str = None): async def backup_import(self, ctx: commands.Context, json: str = None):
"""Import your installed repositories and cogs from an export.""" """Import your installed repositories and cogs from an export."""
if json is None: 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() json = await ctx.message.attachments[0].read()
else: else:
await ctx.send(error("Please provide a valid JSON export.")) await ctx.send(error("Please provide a valid JSON export."))