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

Bot was typing for every message even when it shouldn't. This should fix

This commit is contained in:
Anson 2019-02-12 23:40:56 -07:00
parent 22415a8da2
commit 7215a29d90

View File

@ -113,9 +113,10 @@ def stockInfo(bot, update):
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)
tickerData = tickerInfo.tickerQuote(tickers)
bot.send_chat_action(chat_id=chat_id, action=telegram.ChatAction.TYPING)
for ticker in tickers:
ticker = ticker.upper()
# Makes sure ticker exists