diff options
-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('吾辈推送...完成!') |