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

Ahh yeh i didn't mean rude
But look at his messages

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

Telethon Chat

TL Reference for InputRichMessage

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

Telethon Chat

Are you a fucking Userbot?

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

Telethon Chat

Yeah, TDesktop actually strips \uFE0F client-side before firing the request. Telethon is just a raw MTProto wrapper so it doesn't sanitize anything for you. You just have to strip it manually.

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

Telethon Chat

import asyncio
from telethon import TelegramClient
from telethon.tl import functions, types

api_id = ''
api_hash = ''

client = TelegramClient('reaction', api_id, api_hash)

async def main():
await client.start()

target = '@'
msg_id = 4507
reaction = '❤️'

try:
cleaan = reaction.replace('\ufe0f', '').replace('\uFE0F', '')
entity = await client.get_input_entity(target)

await client(functions.messages.SendReactionRequest(
peer=entity,
msg_id=msg_id,
big=True,
add_to_recent=True,
reaction=[types.ReactionEmoji(emoticon=cleaan)]
))

print("done")

except Exception as e:
print(e)

if __name__ == '__main__':
client.loop.run_until_complete(main())

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

Telethon Chat

It's almost always the exact same character (\uFE0F). It's the universal Unicode variation selector that keyboards automatically add to force the colorful emoji style instead of plain text.
​Just run .replace('\ufe0f', '') on all your emoji strings before passing them to the API. That single replace will fix the errors for the rest of the standard emojis too.

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

Telethon Chat

The red heart emoji "❤️" includes a hidden Unicode character (\uFE0F) that Telegram's API rejects. Just strip it out and wrap the reaction in a list using types.ReactionEmoji.

from telethon.tl import types

cleaan = reaction.replace('\ufe0f', '').replace('\uFE0F', '')

await client(functions.messages.SendReactionRequest(
peer=peer,
msg_id=msg_id,
big=True,
add_to_recent=True,
reaction=[types.ReactionEmoji(emoticon=cleaan)]
))

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

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

Why I can't admin a bot with edit_admin?

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

Telethon Chat

Hi
I have webapp bot
How can i download file in webapp?

Backend (FastApi - FileResponse)

When click it to download, nothing happend

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

Telethon Chat

No need premium account for this?
It's cool

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

Telethon Chat

Has this been updated and how do we do that in telethon?
For now I just use html rich input type constructor and pass the raw html directly :(

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

Telethon Chat

i haven't had it happen myself, so i don't know if the latter is enough. i would expect so

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

Telethon Chat

I mean it's good for these use cases atleast

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

Telethon Chat

Ephemeral messages was needed actually, idk about rich messages tho

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

Telethon Chat

use the *Markdown or *HTML variant depending on your syntax.

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

Telethon Chat

See rich message formatting options and use the raw types available in Telethon.

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

Telethon Chat

If you look at data_message_reactions.cpp, it passes the emoji to Ui::Emoji::Find(). TDesktop actually sanitizes and strips that \uFE0F in its UI engine before ever making the API call. Since Telethon is just a raw API wrapper without a UI engine, it doesn't do that for you. You just have to strip it manually.

https://github.com/telegramdesktop/tdesktop/blob/master/Telegram/SourceFiles/data/data_message_reactions.cpp

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

Telethon Chat

TDesktop adds this character by default.

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

Telethon Chat

perfect thanks I will try to implement

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

Telethon Chat

is there a list of such hidden characters for other emojies or is it the same for all emojies? because likely I have this problem not only with heart emoji, a lot of such errors for other emojies, it's just that I verified only for heart emoji that it's 100% in available list

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

Telethon Chat

hello why might I be getting Invalid reaction provided (only emoji are allowed) (caused by SendReactionRequest) for following

await client(functions.messages.SendReactionRequest(
peer=peer, msg_id=msg_id, big=True, add_to_recent=True,
reaction=reaction,
))


while reaction sent is 100% ❤️ I typed it into the bot and the channel is verified to have this reaction in available reactions list and accounts are participants of the channel?

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

Telethon Chat

Documentation for edit_admin

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

Telethon Chat

Normal like in html
<a href="" download="">.,</a>

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

Telethon Chat

For premium emojis yes for rich messages no.

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

Telethon Chat

There's no hurry tho I'm not doing it anytime soon

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

Telethon Chat

Yeah, and im certain sure as you it can be from that

But myself in years, i haven’t seen the issue after layer update

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

Telethon Chat

tdesktop sometimes makes a commit of a layer that's not finished yet, so that's an option, yes

see diff.telethon.dev. it uses tdesktop. if you toggle the checkbox to view the same layer multiple times, you will see a lot of duplicates

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

Telethon Chat

For now it's new and probably a bit complex to get along with for now

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

Telethon Chat

Ofc they will be used, but usage percentage is what judges the feature need in platform

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