From 7b0d33a4570485a5823cd3223a5a9fd186bc6707 Mon Sep 17 00:00:00 2001 From: missytake Date: Sun, 4 Apr 2021 01:06:13 +0200 Subject: [PATCH] fixing attributeError, hopefully for good --- active_bots/telegrambot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/active_bots/telegrambot.py b/active_bots/telegrambot.py index 6fcc30d..d66c138 100644 --- a/active_bots/telegrambot.py +++ b/active_bots/telegrambot.py @@ -35,7 +35,7 @@ class TelegramBot(Bot): # save the last message, so it doesn't get crawled again user.save_seen_tg(update.update_id) # complain if message is a photo - if update.message.photo is not None: + if update.message and update.message.photo: tb.send_message( update.message.sender.id, "Sending Photos is not supported for privacy reasons. Can "