From 2349350ba8db8a572a49e931891eaa42a4207df4 Mon Sep 17 00:00:00 2001 From: Kyomotoi <1172294279@qq.com> Date: Thu, 15 Apr 2021 14:15:25 +0800 Subject: =?UTF-8?q?=E2=9C=A8=F0=9F=90=9B=E2=9A=A1=EF=B8=8F=20=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增:以图搜图 挖坑:今天吃什么 修复:只响应私聊消息 修复:nsfw部分变量错误 优化:插件名 优化:部分插件代码结构 --- ATRI/plugins/essential.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'ATRI/plugins/essential.py') diff --git a/ATRI/plugins/essential.py b/ATRI/plugins/essential.py index be0d509..0fbed92 100644 --- a/ATRI/plugins/essential.py +++ b/ATRI/plugins/essential.py @@ -90,9 +90,9 @@ async def disconnect(bot) -> None: @run_preprocessor # type: ignore async def _check_block(matcher: Matcher, - bot: Bot, - event: MessageEvent, - state: T_State) -> None: + bot: Bot, + event: MessageEvent, + state: T_State) -> None: user = str(event.user_id) if not sv.BlockSystem.auth_user(user): raise IgnoredException(f'Block user: {user}') @@ -112,8 +112,6 @@ async def _store_message(matcher: Matcher, event, state: T_State) -> None: if isinstance(event, GroupMessageEvent): - group = str(event.group_id) - if event.sub_type == "normal": now_time = datetime.now().strftime('%Y-%m-%d') GROUP_DIR = ESSENTIAL_DIR / 'chat_history' / f'{event.group_id}' @@ -159,12 +157,8 @@ async def _store_message(matcher: Matcher, pass else: pass - - if sv.BlockSystem.auth_group(group): - raise IgnoredException(f'Block group: {group}') else: pass - # 处理:好友请求 -- cgit v1.2.3