修复词条在某些回答下出错

This commit is contained in:
HibiKier
2022-12-31 14:59:56 +08:00
parent def53aa22e
commit 2070014021
5 changed files with 17 additions and 13 deletions
+1 -1
View File
@@ -144,7 +144,7 @@ class AuthChecker:
try:
plugin_name = matcher.plugin_name
cost_gold = await self.auth_cost(plugin_name, bot, event)
if str(event.user_id) not in bot.config.superusers:
if hasattr(event, "user_id") and str(event.user_id) not in bot.config.superusers:
await self.auth_basic(plugin_name, bot, event)
self.auth_group(plugin_name, bot, event)
await self.auth_admin(plugin_name, matcher, bot, event)