Skip to content

Commit

Permalink
[#]修复OCR可能导致的权限问题
Browse files Browse the repository at this point in the history
  • Loading branch information
benx1n committed Oct 16, 2023
1 parent 8c5a03e commit 8b69e7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins/hikari_bot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ async def main(bot: Bot, ev: MessageEvent, matchmsg: Message = CommandArg()): #
superuser_command_list = ['重置监控']
adminuser_command_list = ['添加监控', '删除监控']
for each in superuser_command_list:
if each in str(ev.message) and str(qqid) not in driver.config.superusers:
if (each in str(ev.message) or each in matchmsg) and str(qqid) not in driver.config.superusers:
await bot.send(ev, '该命令仅限超级管理员使用')
return
if str(qqid) not in driver.config.superusers:
for each in adminuser_command_list:
if each in str(ev.message) and qqid not in driver.config.admin_list:
if (each in str(ev.message) or each in matchmsg) and qqid not in driver.config.admin_list:
await bot.send(ev, '请联系机器人搭建者添加权限')
return
hikari = await init_hikari(platform=server_type, PlatformId=str(qqid), command_text=str(matchmsg), GroupId=group_id)
Expand Down

0 comments on commit 8b69e7c

Please sign in to comment.