From e5983ab2b724889071e45a6cf81bf2c506bf63b6 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 18 Dec 2024 22:52:56 +0300 Subject: [PATCH] use avocado_id --- s.py | 3 +-- src/autobioebbing.py | 10 +++++----- src/avocmine.py | 8 ++++---- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/s.py b/s.py index cdb5c76..7d5622a 100644 --- a/s.py +++ b/s.py @@ -30,6 +30,7 @@ if is_termux: # Название сессии sessdb = 'tl-ub' +avocado_id = 6333102398 default_directory = '' default_config_file_path = 'config.json' treat_as_true = ('true', '1', 't', 'y', 'yes', 'yeah', 'yup', 'certainly', 'uh-huh') @@ -104,5 +105,3 @@ class states: wait_before_next_mine = None stats_medkit = 0 stats_most_infect_spam_chats = Counter() - - diff --git a/src/autobioebbing.py b/src/autobioebbing.py index 5156d46..5f9f232 100644 --- a/src/autobioebbing.py +++ b/src/autobioebbing.py @@ -1,5 +1,5 @@ '''This is most huge module for autobioeb, autohealing and etc...''' -from s import states, config +from s import states, config, avocado_id from telethon import events, utils, functions from loguru import logger @@ -13,7 +13,7 @@ import re async def eb(client, c, conn, con, d, get_id, my_id, message_q): @client.on(events.NewMessage( pattern='.*йобнув.*|.*подверг(ла)?.*|.*infected.*|.*сикди.*|.*насрал.*|.*выебал.*|.*за допомогою довіреності.*|.*by authorization infected.*|.*при помощи анонимуса атаковала.*', - from_users=(6333102398, 'me'))) + from_users=(avocado_id, 'me'))) @logger.catch async def podverg_a(event): logger.debug('bio attack detected') @@ -403,7 +403,7 @@ async def eb(client, c, conn, con, d, get_id, my_id, message_q): #################################################################### - @client.on(events.NewMessage(pattern='⏱?🚫 Жертва', from_users=(6333102398,))) + @client.on(events.NewMessage(pattern='⏱?🚫 Жертва', from_users=(avocado_id,))) async def infection_not_found(event): m = event.message if config.a_404_patient and m.mentioned: @@ -418,7 +418,7 @@ async def eb(client, c, conn, con, d, get_id, my_id, message_q): if result.message: logger.info(f'avocado says: {result.message}') - @client.on(events.NewMessage(pattern='🌡 У вас горячка вызванная', from_users=(6333102398,))) + @client.on(events.NewMessage(pattern='🌡 У вас горячка вызванная', from_users=(avocado_id,))) async def need_h(event): m = event.message # reply = await client.get_messages(m.peer_id, ids=m.reply_to.reply_to_msg_id) @@ -427,7 +427,7 @@ async def eb(client, c, conn, con, d, get_id, my_id, message_q): # нада хил ah = await message_q( # отправляет сообщение боту "Хил", - 6333102398, + avocado_id, mark_read=True, delete=False, ) diff --git a/src/avocmine.py b/src/avocmine.py index 2cc58b7..0486bb0 100644 --- a/src/avocmine.py +++ b/src/avocmine.py @@ -1,4 +1,4 @@ -from s import states +from s import states, avocado_id from telethon import events from loguru import logger @@ -11,7 +11,7 @@ import re async def automine_avocado_task(client): logger.info('Automine module started') - @client.on(events.NewMessage(pattern='.*удалось намайнить.*', chats=(6333102398,))) + @client.on(events.NewMessage(pattern='.*удалось намайнить.*', chats=(avocado_id,))) async def automine_success(event): m = event.message if states.automine_enabled: @@ -20,7 +20,7 @@ async def automine_avocado_task(client): states.latest_successfull_mine = time.time() states.wait_before_next_mine = None - @client.on(events.NewMessage(pattern='📉 Неудачная попытка', chats=(6333102398,))) + @client.on(events.NewMessage(pattern='📉 Неудачная попытка', chats=(avocado_id,))) async def automine_fail(event): m = event.message if states.automine_enabled: @@ -47,6 +47,6 @@ async def automine_avocado_task(client): if states.automine_enabled is False: break logger.debug('trying mine...') - await client.send_message(6333102398, 'майн') + await client.send_message(avocado_id, 'майн') await asyncio.sleep(5) # because avocado may slow answer logger.warning('Automine stopped by user')