Skip to content

Commit

Permalink
fix: Raise ValueError if game does not support mimo
Browse files Browse the repository at this point in the history
  • Loading branch information
seriaati committed Dec 16, 2024
1 parent 22b7674 commit 5baba60
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions genshin/client/components/hoyolab.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,11 @@ async def _parse_mimo_args(
if self.default_game is None:
raise RuntimeError("No default game set.")
game = self.default_game

if game not in {types.Game.ZZZ, types.Game.STARRAIL, "hoyolab"}:
raise ValueError(f"{game!r} does not support Traveling Mimo.")
game_id, version_id = await self._get_mimo_game_data(game)

return game_id, version_id

@base.region_specific(types.Region.OVERSEAS)
Expand Down

0 comments on commit 5baba60

Please sign in to comment.