Minor improvements

This commit is contained in:
Michał Rudowicz 2024-06-13 16:45:41 +02:00
parent e343b54dcf
commit c9783eefe0
2 changed files with 3 additions and 1 deletions

2
.gitignore vendored
View File

@ -1 +1,3 @@
config.json config.json
venv/
__pycache__/

View File

@ -23,7 +23,7 @@ async def new_msg(update, context, regexes):
is_spam = True is_spam = True
break break
if is_spam: 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.chat.ban_member(update.message.from_user.id)
await update.message.delete() await update.message.delete()
logging.info("Banned.") logging.info("Banned.")