Skip to content

Commit 8b69e7c

Browse files
committed
[#]修复OCR可能导致的权限问题
1 parent 8c5a03e commit 8b69e7c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/plugins/hikari_bot/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ async def main(bot: Bot, ev: MessageEvent, matchmsg: Message = CommandArg()): #
100100
superuser_command_list = ['重置监控']
101101
adminuser_command_list = ['添加监控', '删除监控']
102102
for each in superuser_command_list:
103-
if each in str(ev.message) and str(qqid) not in driver.config.superusers:
103+
if (each in str(ev.message) or each in matchmsg) and str(qqid) not in driver.config.superusers:
104104
await bot.send(ev, '该命令仅限超级管理员使用')
105105
return
106106
if str(qqid) not in driver.config.superusers:
107107
for each in adminuser_command_list:
108-
if each in str(ev.message) and qqid not in driver.config.admin_list:
108+
if (each in str(ev.message) or each in matchmsg) and qqid not in driver.config.admin_list:
109109
await bot.send(ev, '请联系机器人搭建者添加权限')
110110
return
111111
hikari = await init_hikari(platform=server_type, PlatformId=str(qqid), command_text=str(matchmsg), GroupId=group_id)

0 commit comments

Comments
 (0)