skip if message is none
parent
46ab9e79cf
commit
5683e4b73f
|
@ -34,8 +34,11 @@ class TelegramBot(Bot):
|
||||||
return reports
|
return reports
|
||||||
# save the last message, so it doesn't get crawled again
|
# save the last message, so it doesn't get crawled again
|
||||||
user.save_seen_tg(update.update_id)
|
user.save_seen_tg(update.update_id)
|
||||||
|
# skip if message is None
|
||||||
|
if update.message is None:
|
||||||
|
continue
|
||||||
# complain if message is a photo
|
# complain if message is a photo
|
||||||
if update.message and update.message.photo:
|
if update.message.photo is not None:
|
||||||
tb.send_message(
|
tb.send_message(
|
||||||
update.message.sender.id,
|
update.message.sender.id,
|
||||||
"Sending Photos is not supported for privacy reasons. Can "
|
"Sending Photos is not supported for privacy reasons. Can "
|
||||||
|
|
Loading…
Reference in New Issue