From a74a3fd5c25e946a9872da7764c8e9286a0ae687 Mon Sep 17 00:00:00 2001 From: Stan James Date: Thu, 1 Feb 2018 21:10:09 -0700 Subject: [PATCH] Syntax error --- bot.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/bot.py b/bot.py index fbb6d4a..d9dae85 100644 --- a/bot.py +++ b/bot.py @@ -22,11 +22,8 @@ import unidecode class TelegramMonitorBot: def __init__(self): - self.safe_user_ids = map(int, os.environ['SAFE_USER_IDS'].split(',')) - print (self.safe_user_ids) - self.message_ban_patterns = os.environ['MESSAGE_BAN_PATTERNS'] self.message_ban_re = re.compile(self.message_ban_patterns, re.IGNORECASE) @@ -98,10 +95,10 @@ class TelegramMonitorBot: update.message.text.encode('utf-8')) ) - if not update.message.from_user.id in self.safe_user_ids: - # Security checks - self.security_check_username(bot, update) - self.security_check_message(bot, update) + if not update.message.from_user.id in self.safe_user_ids: + # Security checks + self.security_check_username(bot, update) + self.security_check_message(bot, update) except Exception as e: print(e)