🐛 Fix unbound user in game plugins

This commit is contained in:
xtaodada 2024-06-13 23:23:33 +08:00
parent 2ef50e7efe
commit 4d37de28b6
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -405,6 +405,8 @@ class GenshinHelper(Plugin):
if uid < 10: if uid < 10:
raise PlayerNotFoundError(user_id) raise PlayerNotFoundError(user_id)
region = RegionEnum.HYPERION if uid < 600000000 else RegionEnum.HOYOLAB 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: async with self.public_genshin(user_id, region, uid) as client:
try: try:
client.public = True client.public = True