Fallback emoji⭐️
stars_bw
5958376256788502078
Copy the ID, or take a snippet that is ready to paste.
- Pack
- TgAndroidIcons (t.me/addemoji/TgAndroidIcons)
- Category
- Travel and places
- Sources
Snippets
Each block is ready to paste. Use the snippet on its own. Do not mix it with another formatting mode.
from telegram import MessageEntity
from telegram.constants import MessageEntityType
# python-telegram-bot v20 or newer. Leave parse_mode unset.
text = "Hi ⭐️"
await bot.send_message(
chat_id=CHAT_ID,
text=text,
entities=[
MessageEntity(
type=MessageEntityType.CUSTOM_EMOJI,
offset=3,
length=2,
custom_emoji_id="5958376256788502078",
)
],
)Paste this into a Python bot.
from aiogram.enums import MessageEntityType
from aiogram.types import MessageEntity
# aiogram 3. Do not also set parse_mode.
text = "Hi ⭐️"
await bot.send_message(
chat_id=CHAT_ID,
text=text,
entities=[
MessageEntity(
type=MessageEntityType.CUSTOM_EMOJI,
offset=3,
length=2,
custom_emoji_id="5958376256788502078",
)
],
)Paste this into an aiogram bot.
// Telegraf 4. Keep the ID in quotes.
const text = "Hi ⭐️";
await ctx.reply(text, {
entities: [
{
type: "custom_emoji",
offset: 3,
length: 2,
custom_emoji_id: "5958376256788502078",
},
],
});Paste this into a Telegraf bot.
{
"chat_id": "CHAT_ID",
"text": "Hi ⭐️",
"entities": [
{
"type": "custom_emoji",
"offset": 3,
"length": 2,
"custom_emoji_id": "5958376256788502078"
}
]
}The body of a sendMessage call.
Hi <tg-emoji emoji-id="5958376256788502078">⭐️</tg-emoji>Send this text with parse_mode set to HTML. Do not pass entities as well.
Hi Send this text with parse_mode set to MarkdownV2. The docs ask for a real emoji as the alternative text.
For developers
Keep the ID in quotes. A normal number field can change it. These snippets already use the right counts for the text "Hi ⭐️". Sending rules are in the guide.
Same fallback emoji
5258165702707125574(tgmacicons)5258185631355378853(tgmacicons)5260412365739925015(tgmacicons)5435957248314579621(RestrictedEmoji)5438496463044752972star (NewsEmoji)5839116473951328489(TgAndroidIcons)