telethonchat | Unsorted

Telegram-канал telethonchat - Telethon Chat

6095

Official Telethon's chat! Rules: • Speak English • Stay on topic (questions about Telethon) • Be respectful • Don't ask to ask • Spam-related uses lead to ban • Read https://docs.telethon.dev before asking things here Read more about us @TelethonUpdates

Subscribe to a channel

Telethon Chat

request takes attributes=, choices should be returned in response of first request

Читать полностью…

Telethon Chat

they already existed in layer 203, see the arguments of the request

Читать полностью…

Telethon Chat

/channel/TelethonChat/575773

Читать полностью…

Telethon Chat

TL Reference for StartBot

Читать полностью…

Telethon Chat

Please suggest a library for converting voice to text and text to voice that also supports the Persian (Farsi) language.

Читать полностью…

Telethon Chat

No it serverside
But only for private chats tho

Читать полностью…

Telethon Chat

Dice medias can only be deleted after 24 hours

Читать полностью…

Telethon Chat

The following code includes some cheat commands for Telegram's entertainment commands!
But why are the other unrelated data deleted in the group or channel, while they are not deleted in private chats?
Please help.

@client.on(events.NewMessage(outgoing=True, pattern=r'^تاس (\d+)$'))  
async def dice_cheat_game(event): 
    is_admin = is_fake_event(event) 
    if not is_admin: 
        await event.delete() 
    try: 
        max_num = int(event.pattern_match.group(1)) 
        if not (1 <= max_num <= 6): 
            await safe_respond(event, "╮ عدد باید بین ۱ تا ۶ باشد.") 
            return 
        while True: 
            dice = await client.send_message(event.chat_id, file=types.InputMediaDice("🎲")) 
            await asyncio.sleep(0.2) 
            if dice.media.value == max_num: 
                break 
            try: 
                await dice.delete() 
            except: 
                pass 
    except Exception as e: 
        print(f"{e}") 
 
@client.on(events.NewMessage(outgoing=True, pattern=r'^بسکتبال$')) 
async def basketball_cheat_game(event): 
    is_admin = is_fake_event(event) 
    if not is_admin: 
        await event.delete() 
    try: 
        while True: 
            ball = await client.send_message(event.chat_id, file=types.InputMediaDice("🏀")) 
            await asyncio.sleep(0.2) 
            if ball.media.value == 5: 
                break 
            try: 
                await ball.delete() 
            except: 
                pass 
    except Exception as e: 
        print(f"{e}") 
 
@client.on(events.NewMessage(outgoing=True, pattern=r'^دارت$')) 
async def dart_cheat_game(event): 
    is_admin = is_fake_event(event) 
    if not is_admin: 
        await event.delete() 
    try: 
        while True: 
            dart = await client.send_message(event.chat_id, file=types.InputMediaDice("🎯")) 
            await asyncio.sleep(0.2) 
            if dart.media.value == 6: 
                break 
            try: 
                await dart.delete() 
            except: 
                pass 
    except Exception as e: 
        print(f"{e}") 
 
@client.on(events.NewMessage(outgoing=True, pattern=r'^بولینگ$')) 
async def bowling_cheat_game(event): 
    is_admin = is_fake_event(event) 
    if not is_admin: 
        await event.delete() 
    try: 
        while True: 
            bowling = await client.send_message(event.chat_id, file=types.InputMediaDice("🎳")) 
            await asyncio.sleep(0.2) 
            if bowling.media.value == 6: 
                break 
            try: 
                await bowling.delete() 
            except: 
                pass 
    except Exception as e: 
        print(f"{e}") 
 
@client.on(events.NewMessage(outgoing=True, pattern=r'^شانس$')) 
async def slot_cheat_game(event): 
    is_admin = is_fake_event(event) 
    if not is_admin: 
        await event.delete() 
    try: 
        while True: 
            slot = await client.send_message(event.chat_id, file=types.InputMediaDice("🎰")) 
            await asyncio.sleep(0.2) 
            if slot.media.value == 64: 
                break 
            try: 
                await slot.delete() 
            except: 
                pass 
    except Exception as e: 
        print(f"{e}") 
 
@client.on(events.NewMessage(outgoing=True, pattern=r'^فوتبال$')) 
async def football_cheat_game(event): 
    is_admin = is_fake_event(event) 
    if not is_admin: 
        await event.delete() 
    try: 
        while True: 
            football = await client.send_message(event.chat_id, file=types.InputMediaDice("⚽")) 
            await asyncio.sleep(0.2) 
            if football.media.value == 3: 
                break 
            try: 
                await football.delete() 
            except: 
                pass 
    except Exception as e: 
        print(f"{e}")

Читать полностью…

Telethon Chat

whats subscription joining?

Читать полностью…

Telethon Chat

Do you know how I can convert pyrogram to telethon?

Is there any updated library for converting?
Or are there other ways?

Читать полностью…

Telethon Chat

https://tl.telethon.dev/methods/messages/send_paid_reaction.html

Читать полностью…

Telethon Chat

you will need to react with stars in channel post

Читать полностью…

Telethon Chat

bro, I can give you the finished code.

Читать полностью…

Telethon Chat

Anyone why I got this

from telethon.tl.functions.messages import Report
from telethon.tl.types import InputReportReasonIllegalDrugs

Читать полностью…

Telethon Chat

It's only three. in the event.reactions

Читать полностью…

Telethon Chat

what about sort by models

Читать полностью…

Telethon Chat

hey bro
/channel/TelethonChat/679224
is this feature added or need to patched manually ?

Читать полностью…

Telethon Chat

i have a image url like :
domain.com/hfsd8fs9d7f82318231823

without extention like jpg, png...
in my code send as file i want send as image

await bot.send_file(chat_id, url)

Читать полностью…

Telethon Chat

That is not related to Telethon. Please move to a different group with the correct topic to continue that conversation

Читать полностью…

Telethon Chat

Can I use a telethon click/start instead of send?

Читать полностью…

Telethon Chat

Oh! So there's no solution at all?

Читать полностью…

Telethon Chat

Documentation for start

Читать полностью…

Telethon Chat

you can make users pay to join channel

Читать полностью…

Telethon Chat

Invoices are made for bots. you can ask in a Telegram related chat if an otherwise feature exists, besides subscription joining

Читать полностью…

Telethon Chat

i dont want to send any reactions, i want to generate either an invoice or send a gift payment form so when user click, he can pay stars directly and store stars in the channel directly

Читать полностью…

Telethon Chat

is there not any invoice generate method? or any gift method?

Читать полностью…

Telethon Chat

is there any new way to generate an star invoice on the behalf of the channel so later stars will be stored in the channel?

Читать полностью…

Telethon Chat

TL Reference for messages.Report

Читать полностью…

Telethon Chat

Traceback (most recent call last):
File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 31, in <module>
start(fakepyfile,mainpyfile)
~^^^^^^^^^^^^^^^^^^^^^^^
File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 30, in start
exec(open(mainpyfile).read(), main.dict)
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<string>", line 3, in <module>
ImportError: cannot import name 'Report' from 'telethon.tl.functions.messages' (/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.13/site-packages/telethon/tl/functions/messages.py)
[Program finished]

Читать полностью…

Telethon Chat

/channel/TelethonChat/663636

Читать полностью…
Subscribe to a channel