Compare commits
2 commits
ac761d9284
...
3662ce3b23
Author | SHA1 | Date | |
---|---|---|---|
3662ce3b23 | |||
7fdb106fad |
1 changed files with 2 additions and 2 deletions
|
@ -44,6 +44,7 @@ class Backup(commands.Cog):
|
|||
repo_dict = {
|
||||
"name": repo.name,
|
||||
"url": repo.url,
|
||||
"branch": repo.branch,
|
||||
"cogs": []
|
||||
}
|
||||
|
||||
|
@ -62,8 +63,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
|
||||
|
|
Loading…
Add table
Reference in a new issue