From 133616655fd7bf39f0eea422b5057612cb3cccaa Mon Sep 17 00:00:00 2001 From: Kyomotoi <1172294279@qq.com> Date: Tue, 4 Aug 2020 23:58:43 +0800 Subject: =?UTF-8?q?[Fix]=20=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ATRI/plugins/send.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ATRI/plugins/send.py') diff --git a/ATRI/plugins/send.py b/ATRI/plugins/send.py index 6cc57e1..6cb1905 100644 --- a/ATRI/plugins/send.py +++ b/ATRI/plugins/send.py @@ -9,11 +9,13 @@ master = bot.config.SUPERUSERS ban_group = bot.config.BANGROUP # type: ignore -@on_command('send_all_group', aliases=['公告', '群发', '推送'], only_to_me=False) +@on_command('send_all_group', aliases = ['公告', '群发', '推送'], only_to_me=False) async def send_all_group(session: CommandSession): if session.event.user_id in master: msg = session.current_arg.strip() + start =time.perf_counter() + if not msg: msg = session.get('message', prompt='请告诉吾辈需要群发的内容~!') @@ -28,8 +30,10 @@ async def send_all_group(session: CommandSession): except: pass + + end = time.perf_counter() - await session.send('推送完成!') + await session.send(f'推送完成!\n耗时:{round(end - start, 3)}') @on_command('send_to_group', aliases=['对群'], only_to_me=False) -- cgit v1.2.3