From efe595ba4e43e5c35e459bbe710f5daadd746489 Mon Sep 17 00:00:00 2001 From: Michael De Roover Date: Thu, 15 Apr 2021 00:15:29 +0200 Subject: [PATCH] Add .spam command Because fuck it, why not --- ubot.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ubot.py b/ubot.py index 5c5f4a7..3035a39 100755 --- a/ubot.py +++ b/ubot.py @@ -127,6 +127,12 @@ async def edit(event): rpl += f'**Telethon:** {version.__version__}\n' rpl += f'**Python:** {python_version()}\n' await event.edit(rpl) + + if msg.startswith('.spam'): + cnt = int(msg.split(' ', 2)[1]) + msg = msg.split(' ', 2)[2] + for i in range(0,cnt): + await event.respond(msg) if msg.startswith('.sauce'): rpl = 'Sauce: [ghnou/ubot](https://git.ghnou.su/ghnou/ubot)' @@ -141,6 +147,7 @@ async def edit(event): rpl += '.purgeme - Purge messages.\n' rpl += '.sh - Execute a shell command.\n' rpl += '.sys - Show system information.\n' + rpl += '.spam - Spam messages.. yea.\n' rpl += '.sauce - Get the bot\'s source code.\n' rpl += '.help - Show this help message.\n' await event.edit(rpl)