random import randint
from telethon.tl import types
api_id = 0
api_hash = 'a'
bot_token = 'a'
client = TelegramClient('session', api_id, api_hash)
client.start(bot_token=bot_token)
@client.on(events.NewMessage(pattern=r"^img$"))
async def my_event_handler(event):
url = f'https://t.me/channels/{randint(2, 3)}'
file = types.InputMediaPhotoExternal(url)
await event.reply("test", file=file)
client.run_until_disconnected()
Disable what, the event?
Like this but in my code https://nekobin.com/wugibolune
Обсуждают сегодня