bugfix:修复插件商店插件卸载问题,显示问题,移除权限检查多余部分 (#2124)

* bugfix:修复插件商店插件卸载问题,显示问题,移除权限检查多余部分

* bugfix:修复撤回问题,插件商店显示问题
This commit is contained in:
Copaan
2026-04-21 09:30:47 +08:00
committed by GitHub
parent 4000389a60
commit e53cae09b6
11 changed files with 198 additions and 260 deletions
@@ -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:
# 记录执行时间