add info about chat name when attack happens
This commit is contained in:
parent
0f91fa43bf
commit
f041a5ae58
1 changed files with 3 additions and 1 deletions
4
ubot.py
4
ubot.py
|
@ -55,7 +55,6 @@ class states:
|
||||||
stats_medkit = 0
|
stats_medkit = 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@logger.catch
|
@logger.catch
|
||||||
async def main():
|
async def main():
|
||||||
async with TelegramClient(sessdb, api_id, api_hash) as client:
|
async with TelegramClient(sessdb, api_id, api_hash) as client:
|
||||||
|
@ -197,6 +196,9 @@ async def main():
|
||||||
logger.debug('bio attack detected')
|
logger.debug('bio attack detected')
|
||||||
# хто там кого йобнув(ла)
|
# хто там кого йобнув(ла)
|
||||||
m = event.message
|
m = event.message
|
||||||
|
cinfo = await m.get_chat()
|
||||||
|
chat_name = cinfo.title
|
||||||
|
logger.debug(f"in chat '{chat_name}'")
|
||||||
t = m.raw_text
|
t = m.raw_text
|
||||||
# NOTE: theme hell... any ideas for improvment required
|
# NOTE: theme hell... any ideas for improvment required
|
||||||
# but not use huge regular expression like|that|fuckin|way|a|aaaa|aaaaaaaa
|
# but not use huge regular expression like|that|fuckin|way|a|aaaa|aaaaaaaa
|
||||||
|
|
Loading…
Reference in a new issue