1

As described in api doc for telegram - i can send custom emoji in message.

As update i receive somethings like this:

enter image description here

"text": "",
"entities": [
{
    "offset": 0,
    "length": 2,
    "type": "custom_emoji",
    "custom_emoji_id": "5404870433939922908"
}
]

But when i'm sending same thing as message i see simple emoji:

enter image description here

{
    "chat_id": 123,
    "text": "",
    "entities": [
        {
            "offset": 0,
            "length": 2,
            "type": "custom_emoji",
            "custom_emoji_id": "5404870433939922908"
        }
    ]
}

Have no idea what i'm doing wrong. Help, please.

trying to send custom emoji in message through api.

CallMeStag
  • 5,467
  • 1
  • 7
  • 22

2 Answers2

2

AFAIK custom emoji are a premium feature and bots can't use them.

Edit 2023-08-16: This answer is outdated. Please see chakzefir's answer.

CallMeStag
  • 5,467
  • 1
  • 7
  • 22
  • I have premium account. No restrictions in API documentation. Hmmm... – Windwail128 Qwe Nov 08 '22 at 15:12
  • core.telegram.org/bots/api also doesn't mention that bots of premium users *can* use premium features, though ;-) – CallMeStag Nov 09 '22 at 07:47
  • https://core.telegram.org/bots/api#messageentity custom_emoji_id - is premium option ? If so, why its is not mentioned in documentation ? – Windwail128 Qwe Nov 09 '22 at 10:41
  • 1
    Your bot can receive `MessageEntity` objects as part of a `Message`. Keep in mind that a premium user can send custom emoji to any other account (user or bot). That other account can see the custom emoji but can not send one on its own. The lack of a note "Bots can't send custom emoji" does therefore not mean that they can. If you want to have this clarified by Telegram, I recommend to make a suggestion to TG, e.g. on bugs.telegram.org or to @botsupport. – CallMeStag Nov 09 '22 at 14:48
0

Here is the same question answered How to send custom emoji from Bot in Telegram

In short:

Custom emoji entities can only be used by bots that purchased additional usernames on Fragment.

chakzefir
  • 138
  • 1
  • 9
  • Could you please tell me more explanations? If i purchase username on Fragment via my telegram, the bot which was created by my telegram will use custom emoji? So.. the bot owner's telegram username should be one of the listing of Fragment to use custom emoji? – DotNetStar A Aug 09 '23 at 20:34
  • Answered in main topic https://stackoverflow.com/questions/74437942/how-to-send-custom-emoji-from-bot-in-telegram – chakzefir Aug 15 '23 at 14:15