A battle-tested Telegram and Discord bot for generating AI-powered stickers, powered by Sogni Supernet. This bot will generate images on-demand and convert them into stickers you can easily share.
This bot can generate fun, unique stickers via chat prompt:
Chat prompt example
Sticker examples
Want to create sticker packs from a collection of generated stickers? Details in our official documentation.
- Users type a command (
!generate <prompt>
) in your Telegram/Discord server or DM. - The bot connects to Sogni Supernet to create AI-generated images.
- The images are automatically processed (background removed, etc.) and then returned as stickers!
Sogni.ai is an all-in-one AI toolkit that harnesses a high-speed and extremely scalable “Supernet” dedicated to creative AI tasks. By using Sogni, you get:
- Fast, cheap, on-demand image generation.
- Built-in NSFW filtering and safety checks.
- Cross-platform usage (web, mobile, Mac, iOS) with a single account.
- A robust environment that supports concurrency and stable performance.
You’ll need a free Sogni username and password to use this bot. You can create an account:
- In the Sogni Mac Studio Pro or Sogni Pocket (iOS), or
- At the Sogni Web App (click “Sign Up”)
This bot can run in two modes at once (Telegram and/or Discord). If you only want to run one platform, that’s fine too—just add the corresponding token(s) in the .env. described below.
git clone https://github.com/your-user/sogni-sticker-bot.git
cd sogni-sticker-bot
npm install
Create a .env
file (or use environment variables in your hosting platform) with the following:
TELEGRAM_BOT_TOKEN=xxx
DISCORD_BOT_TOKEN=yyy
SOGNI_USERNAME=mySogniUsername
SOGNI_PASSWORD=mySogniPassword
APP_ID=stickerbot
- TELEGRAM_BOT_TOKEN: Provided by @BotFather after creating a Telegram bot.
- DISCORD_BOT_TOKEN: Create a bot in the Discord Developer Portal, then copy the bot token.
- SOGNI_USERNAME & SOGNI_PASSWORD: Your free Sogni account credentials.
- APP_ID: Any string that uniquely identifies your bot. Defaults to “stickerbot,” but you can set any name you like.
- Open BotFather on Telegram.
- Send
/newbot
and follow the steps (choose a name, username, etc.). - Copy the HTTP API token it gives you and paste it into your
.env
asTELEGRAM_BOT_TOKEN
.
- Go to the Discord Developer Portal.
- Create a new application, then go to Bot > Add Bot.
- Copy the Bot Token and paste it into
.env
asDISCORD_BOT_TOKEN
. - Invite the bot to your server by generating an invite link with the correct scopes and permissions (e.g., “Send Messages”, “Read Message History”, “Attach Files”).
npm start
Or if you use PM2:
pm2 start ecosystem.config.js
That’s it! The bot should connect to both Telegram and Discord if you provided both tokens.
-
Telegram:
- Type
!generate <prompt>
in your group or in a DM to the bot. - The bot will reply with AI-generated stickers.
- Type
-
Discord:
- Type
!generate <prompt>
in any channel where the bot can read messages. - The bot will DM or respond in the same channel with the generated stickers.
- Type
-
Repeat: Use
!repeat
to generate more images based on your previous prompt, if you want more variations.
Admins in Telegram can use slash commands to manage whitelists and blacklists, e.g.:
/addwhitelist cat,dog
/addblacklist spam,scam
/listwhitelist
and/listblacklist
/clearwhitelist
and/clearblacklist
These commands ensure only certain words are allowed (or disallowed) in user prompts.
You can try or use the official Sogni sticker bot instead of running your own:
- Telegram: @SogniAIbot
- Discord: In the official Sogni Community server.
If you’re an admin of your group or server, you can invite the official bot to your community. Then you can set whitelists of words that must be used and blacklists of words that can’t be used, just like you would if you hosted your own.
Feel free to open issues or pull requests to improve the code or documentation.
MIT License.
Powered by Sogni.ai Supernet.
Contact us on Telegram or Discord for help or suggestions!