Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
[Backups]: update TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
nixxoq committed Nov 1, 2023
1 parent 9bf0005 commit 1ec0bb1
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/cogs/backups.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ async def load(self, ctx: commands.Context) -> None:
await msg.edit(embed=embed)

# TODO:
# 1. Restore the server icons, banner (if exists)
# 2. Update rules_channel and public_updates_channel IDs (if exists) in guild after creating channels
"""
"guild": {
"name": self.guild.name,
Expand Down Expand Up @@ -165,11 +167,11 @@ async def load(self, ctx: commands.Context) -> None:
mentionable=data["roles"][str(k)]["mentionable"],
)
except (
disnake.NotFound,
disnake.Forbidden,
disnake.HTTPException,
TypeError,
KeyError,
disnake.NotFound,
disnake.Forbidden,
disnake.HTTPException,
TypeError,
KeyError,
):
continue

Expand Down Expand Up @@ -338,7 +340,7 @@ async def _file(self, ctx: commands.Context) -> None:
backup["roles"] = data["roles"]

with open(
str(ctx.guild.id) + ".json", "w"
str(ctx.guild.id) + ".json", "w"
) as f: # TODO: use ujson + f-string
json.dump(backup, f, indent=4)

Expand Down

0 comments on commit 1ec0bb1

Please sign in to comment.