diff --git a/plugins/genshin/weapon.py b/plugins/genshin/weapon.py index e4778b91..0629d9c0 100644 --- a/plugins/genshin/weapon.py +++ b/plugins/genshin/weapon.py @@ -132,13 +132,15 @@ class WeaponPlugin(Plugin, BasePlugin): allow_sending_without_reply=True, ) if reply_photo.photo: - photo_file_id = reply_photo.photo[0].file_id - tags = _weapons_data.get(weapon_name) - entry = WeaponEntry( - key=f"plugin:weapon:{weapon_name}", - title=weapon_name, - description=weapon_data.story, - tags=tags, - photo_file_id=photo_file_id, - ) - await self.search_service.add_entry(entry) + description = weapon_data.story + if description: + photo_file_id = reply_photo.photo[0].file_id + tags = _weapons_data.get(weapon_name) + entry = WeaponEntry( + key=f"plugin:weapon:{weapon_name}", + title=weapon_name, + description=description, + tags=tags, + photo_file_id=photo_file_id, + ) + await self.search_service.add_entry(entry)