CoolFace
Apppublic

fitgirl-api/DLMY

sourceHugging Faceupdated 1d agoView on Hugging Face
0likes
App README

Telegram Premium Custom Emoji Reposter — Pyrogram

A Pyrogram bot for Hugging Face Spaces (Docker) that:

  • —receives a forwarded/copied post
  • —uses /addem as a reply command
  • —converts configured normal Unicode emojis into Telegram Custom Emoji entities
  • —sends a NEW message directly to your channel
  • —therefore does not create a Forwarded from header
  • —supports text, photo, video, animation, document, audio and voice captions

Important limitation

Telegram Custom Emoji are not simply "Premium Unicode emojis". A bot needs the actual custom_emoji_id for each Custom Emoji. Put those IDs in EMOJI_MAP.

This project includes /getids: reply to a message that already contains Custom Emojis and send /getids. The bot will show the Custom Emoji IDs it can read.

1. Create the bot

Use @BotFather and create a bot. Copy the bot token.

2. Get APIID and APIHASH

Create/get them from Telegram's official API development page: https://my.telegram.org/apps

These are not the bot token.

3. Create a Hugging Face Space

Create a new Space and select:

  • —SDK: Docker

Upload these files:

  • —app.py
  • —requirements.txt
  • —Dockerfile

4. Add Space Variables/Secrets

In Space Settings → Variables and secrets, add:

API_ID API_HASH BOT_TOKEN CHANNEL_ID EMOJI_MAP

Example:

text
API_ID=12345678
API_HASH=abcdef1234567890
BOT_TOKEN=123456:ABC...
CHANNEL_ID=@MyMovieChannel
EMOJI_MAP={"🍿":"1234567890123456789","🎬":"9876543210987654321","🔥":"1111111111111111111"}

Do not publish your bot token or API hash in public source code.

5. Add the bot to the channel

Add the bot as a channel administrator with permission to post messages.

6. Get Custom Emoji IDs

Send a message containing the Premium/Custom Emojis to the bot, then reply to that message with:

text
/getids

The bot will return entries such as:

text
🍿 → 1234567890123456789
🎬 → 9876543210987654321

Put those IDs into EMOJI_MAP.

7. Use it

Send/forward a post to the bot.

Reply to that post:

text
/addem

The bot sends the converted post directly to CHANNEL_ID.

Notes

  • —Only emojis listed in EMOJI_MAP are converted.
  • —The bot keeps the original Unicode emoji characters as the entity placeholder.
  • —The message is sent as a new message, not forwarded.
  • —Telegram permissions/protected content can prevent a bot from accessing some media.
  • —Hugging Face Spaces can sleep depending on the Space/hardware/plan. A sleeping Space cannot process Telegram updates until it is running again.

Included emoji pack

The supplied CreepyEmoji mapping is included in emoji_map.json. The source pack contains 100 entries. Because the source list contains duplicate Unicode emoji keys (for example 😼 and 🏄‍♂️), JSON can only retain one ID for each duplicate key; the last occurrence is retained. All other IDs are preserved.

Pack source: https://t.me/addemoji/CreepyEmoji