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

bot now types in chat while its working.

This commit is contained in:
Anson 2019-05-11 19:45:28 -07:00
parent 74e63bb697
commit 9f87a86bde

6
bot.py
View File

@ -39,6 +39,9 @@ def tickerDetect(bot, update):
message = update.message.text
chat_id = update.message.chat_id
# Let user know bot is working
bot.send_chat_action(chat_id=chat_id, action=telegram.ChatAction.TYPING)
tickers = getTickers(message)
data = tickerData(tickers) if tickers else {}
@ -68,6 +71,9 @@ def news(bot, update):
message = update.message.text
chat_id = update.message.chat_id
# Let user know bot is working
bot.send_chat_action(chat_id=chat_id, action=telegram.ChatAction.TYPING)
tickers = getTickers(message)
news = tickerNews(tickers) if tickers else {}