diff options
author | Kyomotoi <[email protected]> | 2020-07-14 12:55:51 +0800 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-14 12:55:51 +0800 |
commit | 73cb17ab538fc529bad8a40462d581afdce7c1c5 (patch) | |
tree | fb3ff97c74a9c656e10493be3d2f60af7061eb20 /AyaBot/plugins | |
parent | aa8fd9f9c5fa0ed294eef4b6f680300b4b33274b (diff) | |
download | ATRI-73cb17ab538fc529bad8a40462d581afdce7c1c5.tar.gz ATRI-73cb17ab538fc529bad8a40462d581afdce7c1c5.tar.bz2 ATRI-73cb17ab538fc529bad8a40462d581afdce7c1c5.zip |
Update send.py
Diffstat (limited to 'AyaBot/plugins')
-rw-r--r-- | AyaBot/plugins/send.py | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/AyaBot/plugins/send.py b/AyaBot/plugins/send.py index 6efc115..bf9b91e 100644 --- a/AyaBot/plugins/send.py +++ b/AyaBot/plugins/send.py @@ -43,11 +43,22 @@ async def send_to_group(session: CommandSession): group = lg[0] msg = lg[1] + rei = lg[2] + + if rei: + for i in range(1, int(rei)): + try: + await bot.send_group_msg(group_id = group, message = msg) + except: + await session.send('发送失败,请重试') + + else: + await session.send('吾辈推送...完成!') - try: - await bot.send_group_msg(group_id = group, message = msg) - except: - await session.send('发送失败,请重试') + try: + await bot.send_group_msg(group_id = group, message = msg) + except: + await session.send('发送失败,请重试') await session.send('吾辈推送...完成!') |