mirror of
https://gitlab.com/simple-stock-bots/simple-stock-bot.git
synced 2025-06-15 23:06:40 +00:00
some message types were causing an error and flooding the logs
This commit is contained in:
parent
85ff7b7452
commit
0cc47c5a5f
9
bot.py
9
bot.py
@ -156,9 +156,12 @@ def symbol_detect_image(update: Update, context: CallbackContext):
|
|||||||
Makes image captions into text then passes the `update` and `context`
|
Makes image captions into text then passes the `update` and `context`
|
||||||
to symbol detect so that it can reply cashtags in image captions.
|
to symbol detect so that it can reply cashtags in image captions.
|
||||||
"""
|
"""
|
||||||
if update.message.caption:
|
try:
|
||||||
update.message.text = update.message.caption
|
if update.message.caption:
|
||||||
symbol_detect(update, context)
|
update.message.text = update.message.caption
|
||||||
|
symbol_detect(update, context)
|
||||||
|
except AttributeError:
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
def symbol_detect(update: Update, context: CallbackContext):
|
def symbol_detect(update: Update, context: CallbackContext):
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
python-telegram-bot==13.5
|
python-telegram-bot==20
|
||||||
requests==2.25.1
|
requests==2.25.1
|
||||||
pandas==2.0.0
|
pandas==2.0.0
|
||||||
schedule==1.0.0
|
schedule==1.0.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user