mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-14 21:52:56 +08:00
fix(shop): 修改道具不存在时的提示信息
- 将道具不存在时的提示信息从具体的道具名称改为通用提示,避免暴露内部实现细节, 提升用户体验和安全性。 - resolve Bug: 使用道具功能优化 Fixes #2060
This commit is contained in:
parent
f94121080f
commit
045870e2c0
@ -367,7 +367,7 @@ class ShopManage:
|
||||
else:
|
||||
goods_info = await GoodsInfo.get_or_none(goods_name=goods_name)
|
||||
if not goods_info:
|
||||
return f"{goods_name} 不存在..."
|
||||
return "对应的道具不存在..."
|
||||
if goods_info.is_passive:
|
||||
return f"{goods_info.goods_name} 是被动道具, 无法使用..."
|
||||
goods = cls.uuid2goods.get(goods_info.uuid)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user