Allow photo replies to text message updates
This commit is contained in:
@@ -420,7 +420,10 @@ class Bot(TelegramBot):
|
|||||||
if type(reply) is str:
|
if type(reply) is str:
|
||||||
reply = dict(text=reply)
|
reply = dict(text=reply)
|
||||||
try:
|
try:
|
||||||
|
if 'text' in reply:
|
||||||
return await self.send_message(update=update, **reply)
|
return await self.send_message(update=update, **reply)
|
||||||
|
if 'photo' in reply:
|
||||||
|
return await self.send_photo(update=update, **reply)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error(
|
logging.error(
|
||||||
f"Failed to handle text message:\n{e}",
|
f"Failed to handle text message:\n{e}",
|
||||||
|
Reference in New Issue
Block a user