Check if the text property is inside the message object.

master
SchoolGuy 2019-07-14 15:58:22 +02:00
parent 6f823cb016
commit b6b3aa5bfc
1 changed files with 6 additions and 0 deletions

View File

@ -38,6 +38,12 @@ class TelegramBot(Bot):
"Sending Photos is not supported for privacy reasons. Can "
"you describe it as text instead?")
continue
if "text" in update.message:
tb.send_message(
update.message.sender.id,
"We only support text only reporting for privacy reasons."
"Can you describe it as text instead?")
continue
if update.message.text.lower() == "/start":
user.add_telegram_subscribers(update.message.sender.id)
tb.send_message(