From 0df85d831e78ed017feeefd54e5c4c11c69879c2 Mon Sep 17 00:00:00 2001 From: Mike Shultz Date: Mon, 11 May 2020 16:13:32 -0600 Subject: [PATCH] don't compare int to str and expect it to equal... --- bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index f59cb47..caf321c 100644 --- a/bot.py +++ b/bot.py @@ -238,7 +238,7 @@ class TelegramMonitorBot: if not os.environ.get('IGNORE_USER_IDS'): self.ignore_user_ids = [] else: - self.ignore_user_ids = os.environ['IGNORE_USER_IDS'].split(',') + self.ignore_user_ids = list(map(int, os.environ['IGNORE_USER_IDS'].split(','))) # List of chat ids that bot should monitor self.chat_ids = ( @@ -460,7 +460,7 @@ class TelegramMonitorBot: update.effective_user is None or update.effective_user.id in self.ignore_user_ids ): - print("Ignoring update.") + print("{}: Ignoring update.".format(update.update_id)) return try: