Idle Developeridledeveloper.tech

Flag🇬🇫

French Guiana flag

Copy the ID, or paste a snippet below.

ID page

Pack: RestrictedEmoji

ID

5233523014313720667

Sources: abbosahmad/telegram-premium-emojis, uuigww/telegram_emoji_for_llm, Malith-Rukshan/animated-country-flags, saeedtahmtan/telemoji

python-telegram-bot

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=4,
            custom_emoji_id="5233523014313720667",
        )
    ],
)

Paste this into a Python bot.

aiogram 3

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=4,
            custom_emoji_id="5233523014313720667",
        )
    ],
)

Paste this into an aiogram bot.

Telegraf

// Telegraf 4. Keep the ID in quotes.
const text = "Hi 🇬🇫";
await ctx.reply(text, {
  entities: [
    {
      type: "custom_emoji",
      offset: 3,
      length: 4,
      custom_emoji_id: "5233523014313720667",
    },
  ],
});

Paste this into a Telegraf bot.

Bot API JSON

{
  "chat_id": "CHAT_ID",
  "text": "Hi 🇬🇫",
  "entities": [
    {
      "type": "custom_emoji",
      "offset": 3,
      "length": 4,
      "custom_emoji_id": "5233523014313720667"
    }
  ]
}

The body of a sendMessage call.

Bot API HTML

Hi <tg-emoji emoji-id="5233523014313720667">🇬🇫</tg-emoji>

Send this text with parse_mode set to HTML. Do not pass entities as well.

Bot API MarkdownV2

Hi ![🇬🇫](tg://emoji?id=5233523014313720667)

Send this text with parse_mode set to MarkdownV2. The docs ask for a real emoji as the alternative text.

All flags / How to send a custom emoji / flags.json