1
0
mirror of https://gitlab.com/simple-stock-bots/simple-stock-bot.git synced 2025-06-15 23:06:40 +00:00

Bot now says typing in chat when its working on an answer

This commit is contained in:
Anson 2019-02-04 13:19:32 -07:00
parent 6247bc2fb3
commit 5440f3b601

View File

@ -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"):