From f7198e8722f310926cf147bd0b218c5d9ef5d6c3 Mon Sep 17 00:00:00 2001 From: Kyomotoi <1172294279@qq.com> Date: Sun, 22 Nov 2020 01:01:43 +0800 Subject: [Update] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增: * 舆情检测 * 对涩图加以调用限制 修复: * Pixiv插件全体 * 储存群聊信息时无法创建文件 优化: * 部分代码重构,效率up * 调整插件结构,使其看起来更舒服 --- ATRI/plugins/plugin_rich/__init__.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ATRI/plugins/plugin_rich/__init__.py') diff --git a/ATRI/plugins/plugin_rich/__init__.py b/ATRI/plugins/plugin_rich/__init__.py index 51b86e8..6d2dec8 100644 --- a/ATRI/plugins/plugin_rich/__init__.py +++ b/ATRI/plugins/plugin_rich/__init__.py @@ -15,13 +15,13 @@ import json import requests from nonebot.log import logger +from nonebot.typing import Bot, Event from nonebot.plugin import on_message -from nonebot.adapters.cqhttp import Bot, Event -from utils.utils_times import countX -from utils.utils_rule import check_banlist -from utils.utils_request import request_get -from .body import dec +from ATRI.utils.utils_times import countX +from ATRI.utils.utils_rule import check_banlist +from ATRI.utils.utils_request import request_get +from .data_source import dec BILI_REPORT_FORMAT = """[{aid}] Info: Title: {title} @@ -36,7 +36,7 @@ bilibiliRich = on_message(rule=check_banlist()) b_list = [] -@bilibiliRich.handle() # type: ignore +@bilibiliRich.handle() async def _(bot: Bot, event: Event, state: dict) -> None: global b_list user = event.user_id @@ -101,7 +101,7 @@ cloudmusicRich = on_message(rule=check_banlist()) c_list = [] -@cloudmusicRich.handle() # type: ignore +@cloudmusicRich.handle() async def _(bot: Bot, event: Event, state: dict) -> None: global c_list user = event.user_id -- cgit v1.2.3