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
request takes attributes=, choices should be returned in response of first request
Читать полностью…they already existed in layer 203, see the arguments of the request
Читать полностью…Please suggest a library for converting voice to text and text to voice that also supports the Persian (Farsi) language.
Читать полностью…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
hey bro
/channel/TelethonChat/679224
is this feature added or need to patched manually ?
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)
That is not related to Telethon. Please move to a different group with the correct topic to continue that conversation
Читать полностью…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]