mirror of
https://gitlab.com/simple-stock-bots/simple-stock-bot.git
synced 2025-06-15 23:06:40 +00:00
Only look at messages with a $
This commit is contained in:
parent
e8aeba478c
commit
e08573ff7c
7
bot.py
7
bot.py
@ -164,14 +164,17 @@ def symbol_detect(update: Update, context: CallbackContext):
|
||||
try:
|
||||
message = update.message.text
|
||||
chat_id = update.message.chat_id
|
||||
symbols = s.find_symbols(message)
|
||||
if "$" in message:
|
||||
symbols = s.find_symbols(message)
|
||||
info("Looking for Symbols")
|
||||
else:
|
||||
return
|
||||
except AttributeError as ex:
|
||||
info(ex)
|
||||
return
|
||||
if symbols:
|
||||
# Let user know bot is working
|
||||
context.bot.send_chat_action(chat_id=chat_id, action=telegram.ChatAction.TYPING)
|
||||
info(f"User called for symbols: {update.message.chat.username}")
|
||||
info(f"Symbols found: {symbols}")
|
||||
|
||||
for reply in s.price_reply(symbols):
|
||||
|
Loading…
x
Reference in New Issue
Block a user