Skip to content

Commit

Permalink
fix: Fix 404 error when press back btn
Browse files Browse the repository at this point in the history
  • Loading branch information
seriaati committed Feb 27, 2024
1 parent f607753 commit 0bb5270
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 2 additions & 1 deletion hoyo_buddy/ui/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ async def callback(self, i: "INTERACTION") -> Any:
kwargs: dict[str, Any] = {"view": self.view}
if self.embeds:
kwargs["embeds"] = self.embeds
kwargs["attachments"] = self.attachments or []
if self.attachments:
kwargs["attachments"] = self.attachments

await i.response.edit_message(**kwargs)

Expand Down
6 changes: 1 addition & 5 deletions hoyo_buddy/ui/hoyo/hsr_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,7 @@ async def callback(self, i: "INTERACTION") -> None:
assert self.view._card_data is not None
assert self.view._character_id is not None

go_back_button = GoBackButton(
self.view.children,
self.view.get_embeds(i.message),
self.view.get_attachments(i.message),
)
go_back_button = GoBackButton(self.view.children, self.view.get_embeds(i.message))
self.view.clear_items()
self.view.add_item(go_back_button)

Expand Down

0 comments on commit 0bb5270

Please sign in to comment.