π¦ Crashing is not an option. It's built with Rust γ
- π Encode Messages - Hide any text inside emojis using invisible Unicode characters
- π Encode Files - Hide files (photos, videos, stickers, documents, etc.) inside emojis
- π Auto-Decode - Automatically detects and reveals hidden messages or files
- π² Random Emoji - Let the bot pick a random emoji for you
- βοΈ Custom Emoji - Use any emoji you want
- π¬ Inline Mode - Encode messages directly in any chat
- π Admin Stats - Track bot usage with detailed statistics
- π³ Docker Ready - Easy deployment with Docker Compose
- βοΈ Cloud Compatible - Deploy to Railway, Heroku, Render, and more
Using pre-built image from GitHub Container Registry:
# Clone the repository
git clone https://github.com/Malith-Rukshan/Emoji-Encoder-Bot.git
cd Emoji-Encoder-Bot
# Configure environment
cp .env.example .env
# Edit .env and add your BOT_TOKEN
# Start the bot with MongoDB (uses pre-built image)
docker-compose up -d
# View logs
docker-compose logs -f botBuild the image locally:
# Clone the repository
git clone https://github.com/Malith-Rukshan/Emoji-Encoder-Bot.git
cd Emoji-Encoder-Bot
# Configure environment
cp .env.example .env
# Edit .env and add your BOT_TOKEN
# Start the bot with MongoDB (builds locally)
docker-compose -f docker-compose.build.yml up -d
# View logs
docker-compose -f docker-compose.build.yml logs -f bot# Prerequisites: Rust 1.90+
git clone https://github.com/Malith-Rukshan/Emoji-Encoder-Bot.git
cd Emoji-Encoder-Bot
# Configure environment
cp .env.example .env
# Edit .env and add your BOT_TOKEN
# Build and run
cargo build --release
cargo run --releaseDeploy instantly to your favorite cloud platform with pre-configured settings!
- Fork this repository
- Create new project on Railway
- Connect your GitHub repository
- Add environment variables:
BOT_TOKEN(required)MONGODB_URI(optional - use Railway's MongoDB plugin)ADMIN_IDS(optional)
- Deploy!
heroku create your-emoji-bot
heroku config:set BOT_TOKEN=your_token_here
heroku config:set MONGODB_URI=your_mongodb_uri
git push heroku main- Create new Web Service
- Connect repository
- Use Docker runtime
- Add environment variables
- Deploy
| Variable | Required | Description | Default |
|---|---|---|---|
BOT_TOKEN |
β Yes | Telegram bot token from @BotFather | - |
MONGODB_URI |
β No | MongoDB connection string | - |
MONGO_USERNAME |
β No | MongoDB username (Docker Compose) | emojibot |
MONGO_PASSWORD |
β No | MongoDB password (Docker Compose) | emojibot123 |
ADMIN_IDS |
β No | Comma-separated admin user IDs | - |
RUST_LOG |
β No | Logging level | info |
Send /start to @userinfobot on Telegram
For Text:
- Send text to the bot
- Choose an emoji from the grid (or Random/Custom)
- Share the encoded emoji anywhere!
- Send encoded emoji back to automatically decode
For Files:
- Send any file (photo, video, sticker, document, audio, voice, video note, animation)
- Choose an emoji from the grid (or Random/Custom)
- Share the encoded emoji!
- Send encoded emoji back to receive the original file
Use commands to encode/decode messages and files:
/encode <text>- Encode text with random emoji/encode(as reply) - Encode the replied message or file/decode <emoji>- Decode hidden message or file from emoji/decode(as reply) - Decode the replied message or file
Type in any chat:
@EmojiEncoderBot π Secret message here
Select from the results to send the encoded emoji directly!
/start- Start the bot/help- Show help message with usage instructions/about- About this bot/encode <text>- Encode text or reply to a message/decode <emoji>- Decode emoji or reply to a message/stats- View bot statistics (admin only)
The bot uses a clever Unicode trick called Variation Selectors to hide data:
Unicode has special invisible characters called Variation Selectors:
- VS1-VS16 (U+FE00 to U+FE0F) - 16 variations
- VS17-VS256 (U+E0100 to U+E01EF) - 240 variations
These 256 variations perfectly map to all possible byte values (0-255)!
For Text:
-
Encoding: Your text β UTF-8 bytes β Variation selectors β Appended to emoji
Text: "Hello" Bytes: [72, 101, 108, 108, 111] Result: π[VS73][VS102][VS109][VS109][VS112] -
Decoding: Emoji with variations β Extract selectors β Convert to bytes β UTF-8 text
For Files:
-
Encoding: File's unique Telegram file_id β Prefixed with "TG_FILE_" β UTF-8 bytes β Variation selectors β Appended to emoji
File ID: "AgACAgIAAxkBAAI..." Prefixed: "TG_FILE_AgACAgIAAxkBAAI..." Result: π[VS84][VS71][VS95][VS70]...[encoded file_id] -
Decoding: Emoji with variations β Extract selectors β Convert to bytes β Detect "TG_FILE_" prefix β Extract file_id β Send original file
The encoded emoji looks completely normal but contains hidden data! π©β¨
- π· Photos - Any image sent to Telegram
- π¬ Videos - Video files
- π΅ Audio - Music and audio files
- π Documents - Any document files
- π Stickers - Telegram stickers
- π€ Voice - Voice messages
- π₯ Video Notes - Round video messages
- ποΈ Animations - GIFs and animations
- Language: Rust π¦
- Framework: Teloxide 0.17
- Runtime: Tokio 1.47
- Database: MongoDB 3.x (optional)
- β‘ High Performance - Built with Rust for maximum speed
- πͺΆ Lightweight - Only ~14MB binary size, ~17MB RAM usage
- π§ In-Memory State - No database overhead for conversations
- π Optional Stats - Works with or without MongoDB
- π Auto-Reconnect - Resilient to network issues
- π³ Containerized - Production-ready Docker setup
- π¦ Pre-built Images - Available on GitHub Container Registry
Pre-built Docker images are automatically published to GitHub Container Registry on every push to main branch.
- Latest:
ghcr.io/malith-rukshan/emoji-encoder-bot:latest - Branch-based:
ghcr.io/malith-rukshan/emoji-encoder-bot:main-<sha>
# Pull the latest image
docker pull ghcr.io/malith-rukshan/emoji-encoder-bot:latest
# Run directly
docker run -e BOT_TOKEN=your_token ghcr.io/malith-rukshan/emoji-encoder-bot:latest
# Or use docker-compose.yml (recommended)
docker-compose up -dIf you prefer to build from source:
# Build from source
docker-compose -f docker-compose.build.yml up -d
# Or build manually
docker build -t emoji-encoder-bot .The /stats command (admin only) shows:
Database Stats:
- π₯ Total Chats
- π§ Private Users
- π₯ Groups
- π’ Channels
System Stats:
- π§ CPU Usage
- πΎ RAM Usage
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
This project was inspired by the work of paulgb and built using the wonderful Teloxide library and the Rust programming language.
Malith Rukshan
- π Website: malith.dev
- π§ Email: hello@malith.dev
- π¦ Telegram: @MalithRukshan
If you find this project useful, please consider giving it a β!
Made with Rust π¦

