This bot can be used to create collaborative sticker packs for Telegram groups. The code is still WIP, so expect there to be bugs and uncaught errors.
This part is subject to change
- Group admin/owner adds the bot into the group, and sends command
/createPack- Before this, user who wishes to create pack has to authorize the bot by sending
/startto the bot with direct message (not in a group). - This creates the initial Sticker pack with Hello World sticker
- Before this, user who wishes to create pack has to authorize the bot by sending
- After the pack has been created, all images sent to the group with
#stiku (<emojis>)as the caption are added to the pack- Replying to existing image/sticker with
#stiku (<emojis>)also adds it to the pack
- Replying to existing image/sticker with
The user who initially ran the /createPack command owns the sticker pack and can also manually edit the contents
- Clone this repository and install dependencies with
pnpm install - Add
.envfile with following contents:
BOT_TOKEN=<insert your bot token here>
BOT_NAME=<insert your bot username here>
- Build the app with
pnpm build - Run the app with
pnpm start
For generating stickers from text messages there are manual tests you can run with pnpm test:manual. This outputs sticker images to scrips/out directory (gitignored).
You can also use Docker to run the application, build with docker compose build and run with docker compose up
If your system is not directly supported by node-canvas, check what system packages you have to install before running this app.
- Why are emojis not rendered? / Why are emojis rendered using wrong font?
node-canvasuses system emoji font to render emojis. Use Docker if you need other emoji version.
Feel free to submit PR:s to this repo. All code should be formatted with pnpm format.