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
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}")
Do you know how I can convert pyrogram to telethon?
Is there any updated library for converting?
Or are there other ways?
https://tl.telethon.dev/methods/messages/send_paid_reaction.html
Читать полностью…Anyone why I got this
from telethon.tl.functions.messages import ReportЧитать полностью…
from telethon.tl.types import InputReportReasonIllegalDrugs
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.
if number shown
User = await client.get_entity("username" or id)Читать полностью…
print(User.phone)
telegram added sort gifts in resale market by numbers and date and is it available in telethon?
Читать полностью…listen to NewMessage event and it should catch the id and access hash from it
Читать полностью…Invoices are made for bots. you can ask in a Telegram related chat if an otherwise feature exists, besides subscription joining
Читать полностью…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
Читать полностью…is there not any invoice generate method? or any gift method?
Читать полностью…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?
Читать полностью…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]
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.
Hi, how change status account to last seen recently with telethon?
Читать полностью…files i have, what i need is to fix the slow speed
Читать полностью…Hey just wondering how would I be able to get someone’s number extracted from telethon? Is it possible?
Читать полностью…Im getting new message first then giving from webhook, then reply to it. I think the problem is there)
Читать полностью…ok, this error coming, when user writes first to me. With all chats wich we have history working fine
Читать полностью…