diff options
author | Kyomotoi <[email protected]> | 2021-04-15 14:15:25 +0800 |
---|---|---|
committer | Kyomotoi <[email protected]> | 2021-04-15 14:15:25 +0800 |
commit | 2349350ba8db8a572a49e931891eaa42a4207df4 (patch) | |
tree | a86a71fd374d54d7fded9ac52d16b3670d0e6a81 /ATRI/plugins/essential.py | |
parent | d03636606de4c2f8c5c163f0e797325c7d182346 (diff) | |
download | ATRI-2349350ba8db8a572a49e931891eaa42a4207df4.tar.gz ATRI-2349350ba8db8a572a49e931891eaa42a4207df4.tar.bz2 ATRI-2349350ba8db8a572a49e931891eaa42a4207df4.zip |
✨🐛⚡️ 一些改动
新增:以图搜图
挖坑:今天吃什么
修复:只响应私聊消息
修复:nsfw部分变量错误
优化:插件名
优化:部分插件代码结构
Diffstat (limited to 'ATRI/plugins/essential.py')
-rw-r--r-- | ATRI/plugins/essential.py | 12 |
1 files changed, 3 insertions, 9 deletions
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 - # 处理:好友请求 |