fix: when user gold is negative, free plugins is also blocked

This commit is contained in:
Feliciano Long 2024-10-16 10:54:08 +08:00 committed by GitHub
parent fe1634eb2d
commit 24160c7897
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -501,7 +501,7 @@ class AuthChecker:
返回:
int: 需要消耗的金币
"""
if user.gold < plugin.cost_gold:
if user.gold < plugin.cost_gold and plugin.cost_gold > 0:
"""插件消耗金币不足"""
try:
await MessageUtils.build_message(