summaryrefslogtreecommitdiff
path: root/ATRI/plugins/send.py
diff options
context:
space:
mode:
authorKyomotoi <[email protected]>2020-08-04 23:58:43 +0800
committerKyomotoi <[email protected]>2020-08-04 23:58:43 +0800
commit133616655fd7bf39f0eea422b5057612cb3cccaa (patch)
treeab8bfa229574aedac89f37a825cd06ca5a2a9b80 /ATRI/plugins/send.py
parent2607d289de37e535b6599532df4d2c41fc0b2358 (diff)
downloadATRI-133616655fd7bf39f0eea422b5057612cb3cccaa.tar.gz
ATRI-133616655fd7bf39f0eea422b5057612cb3cccaa.tar.bz2
ATRI-133616655fd7bf39f0eea422b5057612cb3cccaa.zip
[Fix] 修复数据库上传问题
Diffstat (limited to 'ATRI/plugins/send.py')
-rw-r--r--ATRI/plugins/send.py8
1 files changed, 6 insertions, 2 deletions
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)