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
how to implement payment by stars in a bot? @unlowly
Читать полностью…New StackOverflow question
Eror Sending Telegram Gift: RPCError 400: PAYMENT_REQUIRED (caused by TransferStarGiftRequest)
https://stackoverflow.com/q/79695629
Hello
I am trying to write a script that allows me to open a web application through my account and do some tasks with it.
how?
Do you have any ideas?
Guys plz can someone tell me wich library python for download torrent and and magnet links can install it via pip only
Thanks
Yeah, that's happening to me too, but does that mean it's fixed?
Читать полностью…^exec async
msg = await client.get_messages("CHAMPIONSCUP2025", ids=[31])
print(msg[0])
res = await msg[0].click(0)
print(res)
if btn is 0 then when you do btn -1 it will be button -1 (not even exists) which will show error when you click it or return None
Читать полностью…Now the problem here is not about starting from 0 or 1, it's about not being able to click on the message, let's solve that,
/channel/CHAMPIONSCUP2025/31
it's programming thing that every index starts from 0
Читать полностью…When I click, the number of votes returns None, but it doesn't increase. What can I do to solve this?
Читать полностью…msg = await client.get_messages(f"@{channel_username}", ids=[idd])
print(msg[0])
res = await msg[0].click(btn-1)
print(res)
I updated but it still returns media=MessageMediaUnsupported(), is this a new type of vote?
please check: /channel/CHAMPIONSCUP2025/31
I can't vote on this type of post.
from telethon.tl.functions.payments import (Читать полностью…
GetPaymentFormRequest,
SendStarsFormRequest
)
from telethon.tl.types import (
InputUser,
InputInvoiceStarGiftTransfer,
InputSavedStarGiftUser
)
invoice = InputInvoiceStarGiftTransfer(
stargift=InputSavedStarGiftUser(msg_id=gift.msg_id),
to_id=InputUser(
user_id=target.id,
access_hash=target.access_hash
)
)
form = await client(GetPaymentFormRequest(invoice=invoice))
await client(SendStarsFormRequest(
form_id=form.form_id,
invoice=invoice
))
That is not related to Telethon. Please move to a different group with the correct topic to continue that conversation
Читать полностью…bro, I think his btn variable is the button index (or number) that is meant to be shown to end users (bot users) so he indexed it from 1 and that is why he needs to decrement it by 1 to get the real button index (that start from 0), this is common approch when dealing with user inputs (because it is easier for users to interact with 1 indexed lists and options than 0 indexed).
as btn starts from 1, it can't be 0 so there is no proplem here.
Executed Code 👑
msg = await client.get_messages("CHAMPIONSCUP2025", ids=[31])
print(msg[0])
res = await msg[0].click(0)
print(res)
Message(id=31, peer_id=PeerChannel(channel_id=2716558764), date=datetime.datetime(2025, 7, 8, 9, 0, 16, tzinfo=datetime.timezone.utc), message='', out=False, mentioned=False, media_unread=False, silent=False, post=True, from_scheduled=False, legacy=False, edit_hide=True, pinned=False, noforwards=False, invert_media=False, offline=False, video_processing_pending=False, from_id=None, from_boosts_applied=None, saved_peer_id=None, fwd_from=None, via_bot_id=None, via_business_bot_id=None, reply_to=None, media=MessageMediaUnsupported(), reply_markup=None, entities=[], views=5245, forwards=0, replies=None, edit_date=datetime.datetime(2025, 7, 8, 9, 24, 1, tzinfo=datetime.timezone.utc), post_author=None, grouped_id=None, reactions=MessageReactions(results=[ReactionCount(reaction=ReactionEmoji(emoticon='👍'), count=347, chosen_order=None), ReactionCount(reaction=ReactionEmoji(emoticon='❤'), count=51, chosen_order=None), ReactionCount(reaction=ReactionEmoji(emoticon='🏆'), count=34, chosen_order=None), ReactionCount(reaction=ReactionEmoji(emoticon='🔥'), count=13, chosen_order=None), ReactionCount(reaction=ReactionEmoji(emoticon='⚡'), count=9, chosen_order=None), ReactionCount(reaction=ReactionEmoji(emoticon='🤝'), count=9, chosen_order=None), ReactionCount(reaction=ReactionEmoji(emoticon='🎉'), count=6, chosen_order=None), ReactionCount(reaction=ReactionEmoji(emoticon='💯'), count=6, chosen_order=None)], min=False, can_see_list=False, reactions_as_tags=False, recent_reactions=[], top_reactors=[]), restriction_reason=[], ttl_period=None, quick_reply_shortcut_id=None, effect=None, factcheck=None, report_delivery_until_date=None, paid_message_stars=None)Читать полностью…
None
Come see if you can click on any of the choices in this post in the telethon: /channel/CHAMPIONSCUP2025/31
Читать полностью…Let's solve the problem, not 0 or 1, there is no error there now, because -1 is not possible, I'm telling you that you need to enter at least 1, the problem here is that you can't click on this message, let's solve that if possible
Читать полностью…I know this well, that's why I made btn-1, because a normal user sees 1, not 0, a non-programmer
Читать полностью…it's not new, share your code and errors with telethon version
Читать полностью…It was because of some internal issues, which should be already resolved.
Читать полностью…Hello, I can't click on my post I posted yesterday because it returns media=MessageMediaUnsupported(). If I get the message, how can I vote for this new type of poll?
Читать полностью…