regex verbose, so we can have comments

This commit is contained in:
Stan James 2018-02-06 15:10:49 -07:00
parent cb3059aad4
commit 1430126c44

6
bot.py
View File

@ -27,13 +27,13 @@ class TelegramMonitorBot:
self.safe_user_ids = map(int, os.environ['SAFE_USER_IDS'].split(','))
self.message_ban_patterns = os.environ['MESSAGE_BAN_PATTERNS']
self.message_ban_re = re.compile(self.message_ban_patterns, re.IGNORECASE)
self.message_ban_re = re.compile(self.message_ban_patterns, re.IGNORECASE | re.VERBOSE)
self.message_hide_patterns = os.environ['MESSAGE_HIDE_PATTERNS']
self.message_hide_re = re.compile(self.message_hide_patterns, re.IGNORECASE)
self.message_hide_re = re.compile(self.message_hide_patterns, re.IGNORECASE | re.VERBOSE)
self.name_ban_patterns = os.environ['NAME_BAN_PATTERNS']
self.name_ban_re = re.compile(self.name_ban_patterns, re.IGNORECASE)
self.name_ban_re = re.compile(self.name_ban_patterns, re.IGNORECASE | re.VERBOSE)
def ban_user(self, update):