Skip to content

Commit

Permalink
fix: Fix other path issues caused by root folder rename
Browse files Browse the repository at this point in the history
  • Loading branch information
seriaati committed Mar 10, 2024
1 parent 2744b14 commit 799b337
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion hoyo_buddy/bot/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,9 @@ async def fetch_source_strings() -> None:

async def load_synced_commands_json(self) -> None:
try:
async with aiofiles.open("src/bot/data/synced_commands.json", encoding="utf-8") as f:
async with aiofiles.open(
"hoyo_buddy/bot/data/synced_commands.json", encoding="utf-8"
) as f:
self.synced_commands = orjson.loads(await f.read())
except FileNotFoundError:
pass
Expand Down
2 changes: 1 addition & 1 deletion hoyo_buddy/cogs/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async def cog_check(self, ctx: "Context") -> bool:
async def sync_command(self, ctx: commands.Context) -> Any:
message = await ctx.send("Syncing commands...")
synced_commands = await self.bot.tree.sync()
async with aiofiles.open("src/bot/data/synced_commands.json", "w") as f:
async with aiofiles.open("hoyo_buddy/bot/data/synced_commands.json", "w") as f:
await f.write(orjson.dumps({c.name: c.id for c in synced_commands}).decode())
await message.edit(content=f"Synced {len(synced_commands)} commands.")

Expand Down
2 changes: 1 addition & 1 deletion hoyo_buddy/web_server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async def _get_mmt(user_id: int) -> dict[str, Any]:
async def _get_page(self, payload: LoginNotifPayload) -> str:
locale = Locale(payload.locale)

async with aiofiles.open("src/web_server/captcha.html", encoding="utf-8") as f:
async with aiofiles.open("hoyo_buddy/web_server/captcha.html", encoding="utf-8") as f:
content = await f.read()

content = (
Expand Down

0 comments on commit 799b337

Please sign in to comment.