How to send message custom_emoji? #335
-
|
Hi. telegoEntities := []telego.MessageEntity{
{
Type: "custom_emoji",
Offset: 7,
Length: 2,
CustomEmojiID: "5289722755871162900",
},
}
params := &telego.SendMessageParams{
ChatID: tu.ID(chatID),
Text: "Привет 🔥", //text,
// Text: `Привет `,
// Text: `Привет <tg-emoji emoji-id="5289722755871162900">🔥</tg-emoji>`,
// ParseMode: telego.ModeMarkdownV2, //telego.ModeMarkdown,
Entities: telegoEntities,
}
sentMessage, err := s.bot.SendMessage(s.ctx, params)Here's what the bot outputs in debug mode: Can you tell me how to send a custom emoji from the bot? A regular smiley arrives... Thank. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
upd: I noticed that messages are sent to groups and personal messages successfully, but a regular emoticon is sent to the channel... |
Beta Was this translation helpful? Give feedback.
-
|
Hi, I actually didn't had a chance to work with custom emoji, your code seems to be correct, and since you said it works properly in personal messages and don't in channels it's most likely limitation of Telegram, you may ask about it in https://t.me/BotTalk |
Beta Was this translation helpful? Give feedback.
Hi, I actually didn't had a chance to work with custom emoji, your code seems to be correct, and since you said it works properly in personal messages and don't in channels it's most likely limitation of Telegram, you may ask about it in https://t.me/BotTalk