4

I want to send premium emojis by Telegram bot (I have a premium account and created a bot with it), but when I try to send it (I send emojis to the premium account), unfortunately, the emoji is sent normally.

my code:

<?php

$entities = [
    'type' => 'custom_emoji',
    'offset' => 4,
    'length' => 2,
    'custom_emoji_id' => '5877565553761062314'
];

$url = "https://api.telegram.org/BotToken";
$url .= "/sendMessage?chat_id=UserChatId";
$url .= "&text=Hi ";
$url .= "&parse_mode=html";
$url .= "&entities=" . json_encode($entities);
echo $url;
file_get_contents($url);

Message should be like this: Message with Telegram custom emoji

Mohammad Zarchi
  • 111
  • 1
  • 8
  • We encountered the same problem. We think that its now available rn because you [can not buy premium for bots](https://telegram.org/faq_premium#:~:text=Q%3A%20Can%20I%20buy%20a%20premium%20subscription%20for%20my%20bots,becomes%20available%20in%20the%20future) – Leon Nov 18 '22 at 12:01
  • Just published the answer in https://stackoverflow.com/questions/74437942/how-to-send-custom-emoji-from-bot-in-telegram/76853897#76853897 – chakzefir Aug 07 '23 at 17:26
  • @chakzefir The emojis you used are normal and are easily available in the free version of Telegram, but I mean premium Telegram emojis that bots are currently unable to send. – Mohammad Zarchi Aug 16 '23 at 08:41
  • @MohammadZarchi yes, I understand what premium or custom emojis are. As I mentioned in the thread above, custom emojis can be used by bots that purchased additional usernames on Fragment. Check the doc https://core.telegram.org/bots/api#markdownv2-style – chakzefir Aug 19 '23 at 09:55

1 Answers1

6

This feature will be activated in the future.

https://telegram.org/faq_premium#q-can-i-buy-a-premium-subscription-for-my-bots

Mohammad Zarchi
  • 111
  • 1
  • 8
  • 1
    That's not what the linked FAQ says. It simply says that it's not currently supported and to follow the blog in case it does get supported in the feature. I'm not sure where you're getting the "will be activated in the future" from. – cigien Nov 23 '22 at 18:16
  • 1
    close/accept this awnser – francisco Nov 26 '22 at 22:08