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
this code works with session string or bot token tho
Читать полностью…calling falls under messaging, it's restricted by its privacy options too
Читать полностью…@beastzx
Never tag lonami for help. Also stay on topic
make sure the group id and access hash has been created and stored in session entities
Читать полностью…while True:Читать полностью…
for group in group_links:
entity = await get_entity(client, group)
if not entity:
continue
sticker_doc = random.choice(stickers)
input_sticker = InputDocument(
id=sticker_doc.id,
access_hash=sticker_doc.access_hash,
file_reference=sticker_doc.file_reference
)
try:
input_peer = await client.get_input_entity(entity)
await client.send_file(
input_peer,
file=input_sticker,
caption=""
)
print(f"✅ {me.first_name} 向 {group} 成功发送贴纸")
from telethon.types import InputSavedStarGiftUser, InputInvoiceStarGiftUpgradeЧитать полностью…
from telethon.functions.payments import GetPaymentFormRequest, SendStarsFormRequest
gift = "GiftObject"
msg_id = gift.msg_id
InputStargift = InputSavedStarGiftUser(msg_id=msg_id)
invoice = InputInvoiceStarGiftUpgrade(
stargift=InputStargift, keep_original_details=True
)
form = await client(GetPaymentFormRequest(
invoice=invoice
))
await client(SendStarsFormRequest(
form_id=form.form_id, invoice=invoice
))
Hi
I have a bot to download from Instagram, but I added to it the feature of temporarily saving files until the results are restored when sending the link itself
But photos and videos are saved in a large size, can file_id or something else be used to reduce the size of the data
from cachetools import TTLCache
gifts yes but buying accounts is not related to telethon
Читать полностью…Hi
Can I buy with a Telegram account and Teleton, star Gift?
How to send video and photos via file id as album?
Send_file?
What does the ForbiddenError: RPCError 403: PRIVACY_PREMIUM_REQUIRED
error mean? At first, I thought the user had set the option to allow calls only for premium users, but such a privacy setting doesn’t even exist.
is there rate limit for GetStarGiftsRequest method?
Читать полностью…I want to write a script for buying gifts and in teleton there is only the GetStarGiftsRequest method, which gives away all possible gifts, but with them you cannot get information about limited gifts
Читать полностью…I can use this method to send stickers to myself, but when I send to a group, I get an error message: Cannot cast Updates to any kind of int.
Читать полностью…it's an website you will need to scrape it and this is not related to telethon
Читать полностью…hi, is there any way to make a reportbot using dsa-report?
Читать полностью…idk but isn't that not an issue to be documented ?
Читать полностью…