mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-08 05:10:01 +08:00
bugfix:修复插件商店插件卸载问题,显示问题,移除权限检查多余部分 (#2124)
* bugfix:修复插件商店插件卸载问题,显示问题,移除权限检查多余部分 * bugfix:修复撤回问题,插件商店显示问题
This commit is contained in:
@@ -8,7 +8,6 @@ from zhenxun.services.log import logger
|
||||
|
||||
from .config import LOGGER_COMMAND, WARNING_THRESHOLD
|
||||
from .exception import SkipPluginException
|
||||
from .utils import send_message
|
||||
|
||||
DEFAULT_GOLD = 100
|
||||
|
||||
@@ -32,8 +31,10 @@ async def auth_cost(
|
||||
user_gold = user.gold if user else DEFAULT_GOLD
|
||||
if user_gold < plugin.cost_gold:
|
||||
"""插件消耗金币不足"""
|
||||
await send_message(session, f"金币不足..该功能需要{plugin.cost_gold}金币..")
|
||||
raise SkipPluginException(f"{plugin.name}({plugin.module}) 金币限制...")
|
||||
raise SkipPluginException(
|
||||
f"{plugin.name}({plugin.module}) 金币限制...",
|
||||
tip_message=f"金币不足..该功能需要{plugin.cost_gold}金币..",
|
||||
)
|
||||
return plugin.cost_gold
|
||||
finally:
|
||||
# 记录执行时间
|
||||
|
||||
Reference in New Issue
Block a user