1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-12-17 23:24:20 +00:00

Send typing notifications on telegram commands

This commit is contained in:
Steffo 2019-08-17 20:13:59 +03:00
parent e078b639d3
commit 22b8cdf97f

View file

@ -113,6 +113,8 @@ class TelegramBot(GenericBot):
# Find and clean parameters # Find and clean parameters
command_text, *parameters = text.split(" ") command_text, *parameters = text.split(" ")
command_name = command_text.replace(f"@{self.client.username}", "").lower() 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 # Call the command
await self.call(command_name, update.message.chat, parameters, update=update) await self.call(command_name, update.message.chat, parameters, update=update)