From e1db381d2a331ebcbf308490ee2d53fb8a8fc0a1 Mon Sep 17 00:00:00 2001 From: Kyomotoi <1172294279@qq.com> Date: Mon, 9 Nov 2020 14:29:09 +0800 Subject: [Update] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 调整文件结构; 修复文件读取、创建问题; 重构部分代码; 修复: - 涩图插件名读取错误 - 私聊消息无法发送 新增: - 好友请求处理 - 邀请请求处理 --- ATRI/plugins/plugin_admin/__init__.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'ATRI/plugins/plugin_admin') diff --git a/ATRI/plugins/plugin_admin/__init__.py b/ATRI/plugins/plugin_admin/__init__.py index 7e19908..663326b 100644 --- a/ATRI/plugins/plugin_admin/__init__.py +++ b/ATRI/plugins/plugin_admin/__init__.py @@ -39,9 +39,7 @@ async def _(bot: Bot, event: Event, state: dict) -> None: func = str(event.message).strip() - if func: - pass - else: + if not func: msg0 = "-==ATRI Switch Control System==-\n" msg0 += "┌Usage: switch on/off-{service}\n" msg0 += "├For SUPERUSER:\n" @@ -232,7 +230,7 @@ groupSendMessage = on_command("群发", permission=SUPERUSER) @groupSendMessage.handle() # type: ignore async def _(bot: Bot, event: Event, state: dict) -> None: - args = str(event.message) + args = str(event.message).strip() if args: state['msg'] = args -- cgit v1.2.3