From 4d37de28b68d57eeb1775e92c44da919c1728af2 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Thu, 13 Jun 2024 23:23:33 +0800 Subject: [PATCH] :bug: Fix unbound user in game plugins --- plugins/tools/genshin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/tools/genshin.py b/plugins/tools/genshin.py index f15dba83..713423d8 100644 --- a/plugins/tools/genshin.py +++ b/plugins/tools/genshin.py @@ -405,6 +405,8 @@ class GenshinHelper(Plugin): if uid < 10: raise PlayerNotFoundError(user_id) region = RegionEnum.HYPERION if uid < 600000000 else RegionEnum.HOYOLAB + if uid is None and region is None: + raise PlayerNotFoundError(user_id) async with self.public_genshin(user_id, region, uid) as client: try: client.public = True