From c9783eefe037199acae1ec5e9ce167ea8dcc6351 Mon Sep 17 00:00:00 2001 From: Michal Rudowicz Date: Thu, 13 Jun 2024 16:45:41 +0200 Subject: [PATCH] Minor improvements --- .gitignore | 2 ++ autobanbot.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d344ba6..2abc3d0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ config.json +venv/ +__pycache__/ diff --git a/autobanbot.py b/autobanbot.py index 0c0a6ac..a79b6e6 100755 --- a/autobanbot.py +++ b/autobanbot.py @@ -23,7 +23,7 @@ async def new_msg(update, context, regexes): is_spam = True break if is_spam: - logging.info(f"Banning: {update.message}") + logging.info(f"Banning {update.message.from_user.name} from {update.message.chat.effective_name}") await update.message.chat.ban_member(update.message.from_user.id) await update.message.delete() logging.info("Banned.")