From f041a5ae58a16fbb657c2a770c513fd8d4b1592e Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 9 Dec 2024 21:34:08 +0300 Subject: [PATCH] add info about chat name when attack happens --- ubot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ubot.py b/ubot.py index d6432b7..ca75fbf 100644 --- a/ubot.py +++ b/ubot.py @@ -55,7 +55,6 @@ class states: stats_medkit = 0 - @logger.catch async def main(): async with TelegramClient(sessdb, api_id, api_hash) as client: @@ -197,6 +196,9 @@ async def main(): logger.debug('bio attack detected') # хто там кого йобнув(ла) m = event.message + cinfo = await m.get_chat() + chat_name = cinfo.title + logger.debug(f"in chat '{chat_name}'") t = m.raw_text # NOTE: theme hell... any ideas for improvment required # but not use huge regular expression like|that|fuckin|way|a|aaaa|aaaaaaaa