From 22b8cdf97f90761c2929b173b76a383c24d48a57 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 17 Aug 2019 20:13:59 +0300 Subject: [PATCH] Send typing notifications on telegram commands --- royalnet/bots/telegram.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/royalnet/bots/telegram.py b/royalnet/bots/telegram.py index 2edad75a..7cccfe39 100644 --- a/royalnet/bots/telegram.py +++ b/royalnet/bots/telegram.py @@ -113,6 +113,8 @@ class TelegramBot(GenericBot): # Find and clean parameters command_text, *parameters = text.split(" ") command_name = command_text.replace(f"@{self.client.username}", "").lower() + # Send a typing notification + self.client.send_chat_action(update.message.chat, telegram.ChatAction.TYPING) # Call the command await self.call(command_name, update.message.chat, parameters, update=update)