π·πΊ Π ΡΡΡΠΊΠΈΠΉ | πΊπΈ English | π¨π³ δΈζ
This project generates SVG badges with the current member count of your Telegram group. Perfect for displaying community activity in GitHub README files or on websites.
Just use URL parameters to generate badges for any Telegram channel or group:
https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel
- Node.js / TypeScript
- Telegram Bot API
- Vercel (Serverless API)
- Jest for testing
Simply add your Telegram channel/group ID to the URL:

That's it! No deployment, no bot token needed.
For advanced users who want to host their own instance:
- Telegram Bot Token (create via @BotFather)
- Vercel account (or any Node.js hosting)
Set environment variables:
BOT_TOKEN
: Your Telegram bot tokenCHAT_ID
: Default chat ID (optional if using URL parameters)
git clone https://github.com/chatman-media/telegram-badge.git
cd telegram-badge
npm install
# Create .env file
echo "BOT_TOKEN=your_bot_token" > .env
echo "CHAT_ID=@your_channel" >> .env
npm run dev
You can customize the badge appearance using the following parameters:
Parameter | Description | Default Value |
---|---|---|
channelId |
Telegram chat ID or username (e.g., ``) | From environment |
style |
Badge style | flat |
label |
Label text | Telegram |
color |
Main badge color | 2AABEE (Telegram color) |
labelColor |
Label color | 555555 |
logo |
Show Telegram logo | true |
flat
- flat style (default)plastic
- plastic style with gradientflat-square
- flat square style without rounded cornersfor-the-badge
- wide style with uppercase letterssocial
- GitHub social style
Standard badge (flat style):
https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel
Badge with plastic style:
https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=plastic
Badge with flat-square style:
https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=flat-square
Badge with for-the-badge style:
https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=for-the-badge
Badge with social style:
https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=social
Badge with custom label and color:
https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&label=Join%20Chat&color=00FF00
Fully customized badge:
https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=for-the-badge&label=Community&color=FF5733&labelColor=1A1A1A
Badge without logo:
https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&logo=false
Badge for specific channel:
https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel
Badge with custom styling:
https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=for-the-badge&color=FF5733
- π₯ Real-time member count display
- π Direct URL parameters - no setup required!
- π¨ Full badge appearance customization
- π Optional self-hosting with secure token storage
- β‘ Optimized caching for fast loading
- π‘οΈ Error handling with informative messages
- π Free to use
- π‘ Can be extended to show activity/message count
- π§ͺ Comprehensive test suite with TypeScript
npm install telegram-badge
import badgeHandler from 'telegram-badge';
// Use in your serverless function
export default badgeHandler;
GET /api/telegram-badge?style=flat&label=Members&color=2AABEE&labelColor=555555
Run the test suite:
npm test
Run type checking:
npm run type-check
Build the project:
npm run build
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- BTC: 14s9Y9Rb2CUWHSAatiQMhfkpx1MWXofUzw
- TON: UQD1M80nPyzph5ZW1vfp_r19XI5MaerNhDq4dWXbXCo96WFj
- NOT: UQD1M80nPyzph5ZW1vfp_r19XI5MaerNhDq4dWXbXCo96WFj
- ETH: 0x286D65151b622dCC16624cEd8463FDa45585fd60
This project is licensed under the MIT License - see the LICENSE file for details.
Made with β€οΈ by Chatman Media