From 34f69778140b52a479f69e6ffe904d785fa20076 Mon Sep 17 00:00:00 2001 From: Stan James Date: Tue, 6 Feb 2018 11:29:46 -0700 Subject: [PATCH] Delete any message worthy of a ban. --- README.md | 4 ++-- bot.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a77d974..3bc9528 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Telegram Group Chat Logger +# Telegram Bot -This is a bot that logs public Group Chats to a Postgres Database. +*NOTE* Development version of bot than does message monitoring and more. ## Installation diff --git a/bot.py b/bot.py index a79a199..76835b4 100644 --- a/bot.py +++ b/bot.py @@ -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):