1
0
Fork 0
forked from bioeb_org/ub4tg

possibly select pathogen quantity in .bioebmass

This commit is contained in:
Your Name 2024-12-18 20:43:22 +03:00
parent 3223f2c631
commit d89340fbbc

View file

@ -310,8 +310,14 @@ async def eb(client, c, conn, con, d, get_id, my_id, message_q):
insertion_status = '\n'.join(insertion_status)
await event.edit(f'{insertion_status}\nreason: {reason}')
@client.on(events.NewMessage(outgoing=True, pattern=r'\.bioebmass$'))
@client.on(events.NewMessage(outgoing=True, pattern=r'\.bioebmass'))
async def bioeb_mass(event):
arg = event.text.split(' ', 1)
if len(arg) > 1:
try:
arg = int(arg[1])
except:
await event.edit('Argument should be integer from 1 to 10')
reply = await client.get_messages(event.peer_id, ids=event.reply_to.reply_to_msg_id)
when = int(datetime.timestamp(event.date))
t = reply.raw_text
@ -355,7 +361,10 @@ async def eb(client, c, conn, con, d, get_id, my_id, message_q):
await event.edit(f'trying eat {bioebbing_len} patients...')
for patient in bioebbing_ids:
await asyncio.sleep(random.uniform(1.234, 4.222))
await event.respond(f'биоеб {patient}')
if arg:
await event.respond(f'биоеб {arg} {patient}')
else:
await event.respond(f'биоеб {patient}')
@client.on(events.NewMessage(outgoing=True, pattern=r'\.biocheck$'))
async def set_default_check_chat(event):