From 1804f6d1e29def24fbd848e382d3241b5cc822a9 Mon Sep 17 00:00:00 2001 From: BFlow Date: Mon, 20 Apr 2020 16:15:19 +0200 Subject: [PATCH] correction typing message in on_message --- kabot/kabot/kabot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kabot/kabot/kabot.py b/kabot/kabot/kabot.py index 0fb9c6f..16283b3 100644 --- a/kabot/kabot/kabot.py +++ b/kabot/kabot/kabot.py @@ -410,7 +410,10 @@ def main(): f.write(message.content + '\n') response = random.choice(lines).replace(str(bot.user.id), str(message.author.id)) with message.channel.typing(): - await asyncio.sleep(len(response)/2) + if "http" in response: + await asyncio.sleep(len(response)/5) + else: + await asyncio.sleep(len(response)/4) await message.channel.send(response) await bot.process_commands(message)