use avocado_id

This commit is contained in:
Your Name 2024-12-18 22:52:56 +03:00
parent aeb46ec681
commit e5983ab2b7
3 changed files with 10 additions and 11 deletions

3
s.py
View file

@ -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()

View file

@ -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,
)

View file

@ -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')