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

to use channel by id you must join it, to join it you must use the channel by id, so you created a loop

so just don't pick ids here and there, where did you get that thing

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

Telethon Chat

await account(functions.channels.JoinChannelRequest(-1002522222))

Right ?

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

Telethon Chat

Hi
Why?

Could not find the input entity for PeerChannel(channel_id=...............) (PeerChannel). Please read https://docs.telethon.dev/en/stable/concepts/entities.html to find out more details.

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

Telethon Chat

Thank you, I will try

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

Telethon Chat

Oh, i get it. So if I were to forward that message from the userbot to a normal bot, how can I then make a user profile button?

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

Telethon Chat

user_retries = {}

user_retries[user_id][forwards] = {'forwards': 1}

if user_retries[user_id][forwards] <= 3:
pass
user_retries[user_id][forwards] += 1
else:
print('you can only forward 3 messages from this user per day')

mess code but it's just example

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

Telethon Chat

Hello, I wanted to note that the documentation for SearchPostsRequest seems wrong.
https://tl.telethon.dev/methods/stories/search_posts.html

hashtag can not be omitted and is not optional.
It looks like this was noted in a closed issue on the github but the documentation was left unchanged.

https://github.com/LonamiWebs/Telethon/issues/4547

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

Telethon Chat

I don't want to get banned

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

Telethon Chat

Yes. Use Fragment + TON API

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

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

New StackOverflow question
How to Receive Telegram Messages in Less Than 500ms?

https://stackoverflow.com/q/79518523

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

Telethon Chat

,thumb=types.InputWebDocument("https://emoji.aranja.com/static/emoji-data/img-apple-160/1f3b6.png",0,"image/png",[]))])

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

Telethon Chat

import random
from telethon import functions, types

async def send_screenshot_notification(client, chat_id, msg_id):
await client(functions.messages.SendScreenshotNotificationRequest(
peer=await client.get_entity(chat_id),
reply_to=types.InputReplyToMessage(reply_to_msg_id=msg_id),
random_id=random.randint(1, 2**63 - 1)
))

await send_screenshot_notification(client, 93602376, 12)

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

Telethon Chat

https://telegram.org/verify#third-party-verification

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

Telethon Chat

/channel/TelethonChat/564998

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

Telethon Chat

does telethon un-bot APIify that

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

Telethon Chat

your Jordan's are fake, join the cool club by joining that channel first before using its id

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

Telethon Chat

you can know if a user has forward privacy enabled through /channel/TelethonChat/583823, if it's enabled, it'd be useless to forward, so fallback to username, if no username, you can't do anything

both username fetch and GetFullUser can get floody on extended usage. you could just handle errors instead too

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

Telethon Chat

^
the bot only needs to receive an event with forward header, the library will cache the user and bot.get_input_entity(id) won't fail

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

Telethon Chat

user_id = channel_id

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

Telethon Chat

That's not really documentation, it's auto generated api reference. and Telegram schema decides what's optional. tag can be omitted if area search was done

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

Telethon Chat

They don't unban here 😂😂

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

Telethon Chat

Is there an API for fragment?

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

Telethon Chat

Is it possible to gift telegram premium using an API

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

Telethon Chat

ofc
actually you taught me this yourself
just extract the messages attributes, and add one per user when the name matches

you just use get messages to get the messages

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

Telethon Chat

I have a private telegram channel where i forward messages from users. Can I somehow use self bot to run a loop on all messages in chat (to count how much messages per user)

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

Telethon Chat

Missing thumbnail

I know this question has been brought up a few times already, but I don't seem to find an answer.

I have harchoir installed, and I'm passing a file to thumb=. Somehow the uploaded file still doesn't have a thumbnail.

What can I be doing wrong?

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

Telethon Chat

how to send the screenshot notification using SendScreenshotNotificationRequest ?
———
Answer:

import random
from telethon import functions, types

async def send_screenshot_notification(client, chat_id, msg_id):
await client(functions.messages.SendScreenshotNotificationRequest(
peer=await client.get_entity(chat_id),
reply_to=types.InputReplyToMessage(reply_to_msg_id=msg_id),
random_id=random.randint(1, 2**63 - 1)
))

await send_screenshot_notification(client, 93602376, 12)

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

Telethon Chat

How? And which organisations are included? Any docs?

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

Telethon Chat

how i can open "startapp" links with telethon account?

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