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:
parent
22415a8da2
commit
7215a29d90
@ -113,9 +113,10 @@ def stockInfo(bot, update):
|
|||||||
try:
|
try:
|
||||||
# regex to find tickers in messages, looks for up to 4 word characters following a dollar sign and captures the 4 word characters
|
# 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)
|
tickers = re.findall("[$](\w{1,4})", message)
|
||||||
bot.send_chat_action(chat_id=chat_id, action=telegram.ChatAction.TYPING)
|
|
||||||
|
|
||||||
tickerData = tickerInfo.tickerQuote(tickers)
|
tickerData = tickerInfo.tickerQuote(tickers)
|
||||||
|
bot.send_chat_action(chat_id=chat_id, action=telegram.ChatAction.TYPING)
|
||||||
|
|
||||||
for ticker in tickers:
|
for ticker in tickers:
|
||||||
ticker = ticker.upper()
|
ticker = ticker.upper()
|
||||||
# Makes sure ticker exists
|
# Makes sure ticker exists
|
||||||
|
Loading…
x
Reference in New Issue
Block a user