From 5440f3b601806fe313697413f644b983f5b7f989 Mon Sep 17 00:00:00 2001 From: Anson Date: Mon, 4 Feb 2019 13:19:32 -0700 Subject: [PATCH] Bot now says typing in chat when its working on an answer --- stockBot.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stockBot.py b/stockBot.py index e72c6e6..e4d76b4 100644 --- a/stockBot.py +++ b/stockBot.py @@ -34,9 +34,12 @@ def help(bot, update): def stockInfo(bot, update): message = update.message.text + chat_id = update.message.chat_id + try: # regex to find tickers in messages, looks for up to 4 word characters following a dollar sign and captures the 4 word characters tickers = re.findall("[$](\w{1,4})", message) + bot.send_chat_action(chat_id=chat_id, action=telegram.ChatAction.TYPING) # Checks if !news is called, and prints news embed if it is if message.startswith("!news"):