mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-21 22:58:05 +00:00
🎨 Add get icon exception handling
This commit is contained in:
parent
2de87788b1
commit
57006259f1
@ -38,6 +38,9 @@ class Inline(Plugin):
|
||||
icon = await self.assets_service.weapon(weapons_name).get_link("icon")
|
||||
except AssetsCouldNotFound:
|
||||
continue
|
||||
except Exception as exc:
|
||||
logger.error("获取武器信息失败 %s", str(exc))
|
||||
continue
|
||||
data = {"name": weapons_name, "icon": icon}
|
||||
self.weapons_list.append(data)
|
||||
logger.success("Inline 模块获取武器列表成功")
|
||||
@ -50,6 +53,9 @@ class Inline(Plugin):
|
||||
icon = await self.assets_service.avatar(character_name).get_link("icon")
|
||||
except AssetsCouldNotFound:
|
||||
continue
|
||||
except Exception as exc:
|
||||
logger.error("获取角色信息失败 %s", str(exc))
|
||||
continue
|
||||
data = {"name": character_name, "icon": icon}
|
||||
self.characters_list.append(data)
|
||||
logger.success("Inline 模块获取角色列表成功")
|
||||
|
Loading…
Reference in New Issue
Block a user