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

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

Documentation for send_file

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

Telethon Chat

TL Reference for SetPrivacy

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

Telethon Chat

If you want to increase up/down speed, you can install cryptg via pip.
This module aims to provide a better encryption/decryption algorithm for Telegram clients.
If you want to increase speed even further, you can use this snippet
Be cautious while using it, because it can lead to FloodWait error, as it uses multiple simultaneous connections.

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

Telethon Chat

/channel/DC_Speed_Test

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

Telethon Chat

if number shown

User = await client.get_entity("username" or id)
print(User.phone)

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

Telethon Chat

telegram added sort gifts in resale market by numbers and date and is it available in telethon?

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

Telethon Chat

listen to NewMessage event and it should catch the id and access hash from it

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

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

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

Telethon Chat

Hi and welcome to the group. Before asking any questions, please read the rules from the group's description, and don't forget to read the docs. Make sure you are using the latest version with pip3 install -U telethon, since most problems have already been fixed in newer versions.

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

Telethon Chat

Hi, how change status account to last seen recently with telethon?

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

Telethon Chat

files i have, what i need is to fix the slow speed

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

Telethon Chat

hi guys any ideas to test?

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

Telethon Chat

Hey just wondering how would I be able to get someone’s number extracted from telethon? Is it possible?

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

Telethon Chat

Im getting new message first then giving from webhook, then reply to it. I think the problem is there)

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

Telethon Chat

ok, this error coming, when user writes first to me. With all chats wich we have history working fine

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