every group at every 10 min
counter = 10
tol = "hello"
file = None
for _ in range(counter):
async for lol in event.client.iter_dialogs():
if lol.is_group:
chat = lol.id
try:
await event.client.send_message(chat, tol, file=file)
except BaseException:
pass
Is this work?
Make a list( all group IDs) Then create a while loop while True: for i in list: # code await asyncio.sleep(600)
How to make a list of all group id
Обсуждают сегодня