Delete any message worthy of a ban.

This commit is contained in:
Stan James
2018-02-06 11:29:46 -07:00
parent 69e5e1b208
commit 34f6977814
2 changed files with 4 additions and 2 deletions

2
bot.py
View File

@ -79,6 +79,8 @@ class TelegramMonitorBot:
update.message.reply_text("DEBUG: Ban message match: {}".format(update.message.text.encode('utf-8')))
print("Ban message match: {}".format(update.message.text.encode('utf-8')))
self.ban_user(update)
# Any message that causes a ban gets deleted
update.message.delete()
def logger(self, bot, update):