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
Is it possible to add the user ID to the cache? My test user doesn’t have any forward privacy restrictions, but I still can’t use the link with the ID.
Читать полностью…Hello
I’m developing a Telegram bot and encountered an issue:
1. Mentioning a user without a username in a private chat.
Let’s say there’s a user A in a group who doesn’t have a username.
My bot is in this group and sees that user A has written something. The bot sends a message in a private chat, i.e., directly to another user, and mentions user A so that clicking on the link opens user A’s profile.
This works perfectly for f"/channel/{user.username}"
. However, when I use the ID in the link instead of the username, like f"tg://user?id={user.id}"
, the link just doesn’t display. For example, if I write f'[{user.first_name}](tg://user?id={user.id})',
I only see the first name in the message, and it’s not clickable.
Is there any solution? I just need to make it so that clicking the link opens the person’s profile. But this is happening outside the context of a group, specifically in a private message.
I’d appreciate any help.
How did some webapps then receive this information, did they open a separate endpoint for them?
Читать полностью…how can i get when is user registrated in telegram via telethon?
Читать полностью…Hey! can i get buttons names and numbers (to click) (inline)
Читать полностью…Sorry OtpMall Support, this is the last time you do that (offtopic); I've had enough.
Читать полностью…I found through group messages that I can modify the username to get the photo, so I want to ask if there is a function to get the avatar link without the username
/channel/i/userpic/320/username.jpg
/channel/i/userpic/320/TelethonChat.jpg
Does anyone know how this link is generated?
the bot must have that user id in cache or the link won't work. this usually works fine on its own. some users have forward privacy and cannot be mentioned outside of where they are
Читать полностью…functions.channels.GetAdminedPublicChannelsRequest can this function also get private channels and owned channels? even if I left that closed group or channel?
Читать полностью…by user id it is possible to know when the user register to Telegram ?
Читать полностью…I don't know how
I want send Like this with parse mode = html
Do anyone have problems with bot authorization on test server? I receive telethon.errors.rpcerrorlist.AccessTokenInvalidError: The provided token is not valid (caused by ImportBotAuthorizationRequest).
client = TelegramClient(session_name, api_id, api_hash)
client.session.set_dc(2, "149.154.167.41", 443) # also tried 80 port
client.start(bot_token=bot_token)
ⓘ4-account: 9235510326**
error: Could not find the input entity for PeerUser(user_id=7170771870) (PeerUser). Please read https://docs.telethon.dev/en/stable/concepts/entities.html to find out more details.
ⓘ5-akkaunt: 9235515588**
User(id=7170771870, is_self=False, contact=False, mutual_contact=False, deleted=False, bot=False, bot_chat_history=False, bot_nochats=False, verified=False, restricted=False, min=False, bot_inline_geo=False, support=False, scam=False, apply_min_photo=True, fake=Fals......
why my some accounts can find by entity but some's cannot?
Hey
how can i send/edit message like this :
{'code': 1}Читать полностью…
There isn't. and username is unintended to be used outside login widgets
Читать полностью…Make sure you have imported StringIO from io, traceback and sys if you are gonna use that as it is
Читать полностью…