s
from telethon import custom
...
@client.on(...)
async def ...(...: custom.Message): ...
Size: a a a
s
from telethon import custom
...
@client.on(...)
async def ...(...: custom.Message): ...
D[
😇๖
😇๖
s
D[
D[
s
MV
MV
D[
D[
MV
MV
pip3 install -U https://github.com/LonamiWebs/Telethon/archive/master.zip
.MV
@client.on(events.NewMessage(chats=000000, incoming=True,
func=lambda e: (type(e.message.media) == MessageMediaDice) and not e.message.via_bot_id
and not e.message.fwd_from))
async def handler(event):
if event.message.from_id == 0000:
return await client.send_message(event.message.chat_id, f'<i>Ну ему можно</i>',
parse_mode='html', reply_to=event.message.id)
dice_result = event.message.media.value
await client.edit_permissions(entity=00000, user=event.message.from_id,
until_date=timedelta(minutes=dice_result * 10),
send_messages=False)
await asyncio.sleep(5)
await client.send_message(event.message.chat_id, f'<i>Лолкек\nОтлетаешь в мут на <code>{dice_result * 10}'
f'</code> минут</i>',
parse_mode='html', reply_to=event.message.id)
D[
ЛХ
ЛХ
MV
ВФ