tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

No documentation for custom emojis #2448

Closed salut1618 closed 1 year ago

salut1618 commented 1 year ago

The Issue

There seems to be no documentation available for how to obtain AnimatedEmojis of custom emojis, using the normal getAnimatedEmoji requries a text representation of the emoji, and custom_emojis are usually represented by id

Things i tried

putting the id from "custom_emoji_id" field putting the unicode of the emoji tried to embed it in text with "<embed id=*>emoji</embed>"

they all resulted in error 404

nothing seemed to work.

Lastly

I apologize if what i presented was incomplete info, or was previously discussed. its my first issue i open on github

levlam commented 1 year ago

You can find documentation for the latest TDLib version at https://github.com/tdlib/td/blob/master/td/generate/scheme/td_api.tl. You can search there for "CustomEmoji"/"custom_emoji" to find all relevant methods. Namely, the method getCustomEmojiStickers can be used to get the sticker, corresponding to the custom emoji. If a message consists of a single custom emoji, its content will be automatically changed to messageAnimatedEmoji by TDLib.

salut1618 commented 1 year ago

Thanks for the response and time it took you to write it, it resolved it

Though may i ask how about obtaining the custom emoji packs? how would someone approach obtaining all custom emoji ids

levlam commented 1 year ago

Custom emoji packs are created by users. There are a lot of them.