1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

Send typing notification while preparing the command

This commit is contained in:
Steffo 2019-02-09 20:13:57 +01:00
parent 80a2a7642b
commit 223e2f5296

View file

@ -80,6 +80,7 @@ def command(func: "function"):
def new_func(bot: telegram.Bot, update: telegram.Update): def new_func(bot: telegram.Bot, update: telegram.Update):
# noinspection PyBroadException # noinspection PyBroadException
try: try:
bot.send_chat_action(update.message.chat.id, telegram.ChatAction.TYPING)
session = db.Session() session = db.Session()
return func(bot, update, session) return func(bot, update, session)
except TimedOut: except TimedOut: