diff options
author | Kyomotoi <[email protected]> | 2020-07-08 09:22:39 +0800 |
---|---|---|
committer | Kyomotoi <[email protected]> | 2020-07-08 09:22:39 +0800 |
commit | 1da04936a85bd3599aa975bafe30d1f88d9d5c9a (patch) | |
tree | 17cea6db7e157d3f11becd4f0af7054c07934188 /AyaBot/plugins | |
parent | 66dff1cb12ba7c2b9714c4ee41ba76c3aefb235c (diff) | |
download | ATRI-1da04936a85bd3599aa975bafe30d1f88d9d5c9a.tar.gz ATRI-1da04936a85bd3599aa975bafe30d1f88d9d5c9a.tar.bz2 ATRI-1da04936a85bd3599aa975bafe30d1f88d9d5c9a.zip |
Update other.py
Diffstat (limited to 'AyaBot/plugins')
-rw-r--r-- | AyaBot/plugins/other.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/AyaBot/plugins/other.py b/AyaBot/plugins/other.py index ec489ff..6ce689a 100644 --- a/AyaBot/plugins/other.py +++ b/AyaBot/plugins/other.py @@ -1,10 +1,7 @@ # -*- coding:utf-8 -*- -import os -import jieba import random import nonebot -from nonebot import on_command, CommandSession, permission as perm, on_request -from nonebot import on_natural_language, NLPSession, IntentCommand +from nonebot import on_command, CommandSession, permission as perm bot = nonebot.get_bot() @@ -32,7 +29,7 @@ async def _(session: CommandSession): async def _(session: CommandSession): try: seach_group_member = await session.bot.get_group_member_list( - group_id=session.ctx['group_id'] + group_id=session.event.group_id ) except: await session.send('获取数据时出问题,请重试') @@ -42,7 +39,7 @@ async def _(session: CommandSession): @on_command('send_all_group', aliases=['公告', '群发', '推送'], only_to_me=False) async def send_all_group(session: CommandSession): - if session.ctx['user_id'] in master: + if session.event.user_id in master: msg=session.current_arg.strip() if not msg: msg = session.get('message', prompt='请键入内容') |