Telegram bot to convert medias in the format required to be used as Telegram stickers
- How to use the bot
- How to create a new sticker
- How to set up the project
- How to run the bot locally
- How to launch the bot using Docker
- How to contribute to the project
- Hacktoberfest
- Useful information
- Privacy policy
- License
You can use the bot going here: start it, and you can now send it the medias you need to convert.
Based on what you send, Stickerify will answer the following:
- the converted media, if you sent a supported file (images, gifs, videos, and existing Telegram stickers are supported) that needed conversion
- no file, if you sent a media already suiting Telegram's requirements
- an error message, if you sent either an unsupported or a corrupted file
- an informative message for any message without a file
flowchart LR
A[User] -->|Message| B([Stickerify])
B -->|Request contains a file| C{Is file supported?}
click B "https://t.me/StickerifyImageBot" _blank
style B fill: #2889ba, stroke: #e0e0e0, color: #e0e0e0
C -->|Yes| D{Does file need conversion?}
C -->|No| E(Error message)
B -->|Request has only text| F{Is help or start command?}
F -->|Yes| G(Show bot usage)
F -->|No| H(About message)
D -->|Yes| J(Convert file)
D -->|No| K(No conversion)
- Chat with Stickers, and use it to create a sticker pack
- Ask Stickers to add a new sticker
- Use Stickerify to create the proper file for your sticker
- Forward Stickerify's message to Stickers
- Choose an emoji representing your sticker
And it's done!
- Install JDK 23 (or higher)
- Clone the project and move into its folder
- Run the command
./gradlew build -x test
- Import the project inside your IDE as a Gradle project
- Ensure your IDE is correctly configured to use a Java 23 (or higher) JDK
After you successfully set up the project, you will have to go through the following steps:
- Chat with BotFather and ask it to create a new bot
- Copy the token it provided you and either:
- set it as the value of a new environment variable named
STICKERIFY_TOKEN
- use it as the value passed to the
super(botToken)
constructor inside the classStickerify
- set it as the value of a new environment variable named
- Install FFmpeg
- Run the
Main
class to start the bot, it will be now able to answer messages in Telegram
-
Install Docker
-
Prepare the Docker image either:
-
moving into the project folder and building the image with the command:
docker build -t rob93c/stickerify .
-
pulling the image from Docker Hub:
docker pull rob93c/stickerify
-
-
Now you just need to run the Docker image passing the token (
{{TOKEN}}
) retrieved from BotFather:docker run -e "STICKERIFY_TOKEN={{TOKEN}}" rob93c/stickerify
Take a look at this project's contributing guidelines here.
Have any question? Consider opening a new discussion.
Hacktoberfest is an event aiming to encourage people to contribute to open-source projects every October. This project adheres to this initiative and welcomes any hacktoberfest-related improvement!
If you would like to improve Stickerify as part of this event, first read the contributing guidelines and then consider opening a new issue and/or pull request.
If your pull request represents a valid contribution to the project, it will be marked as hacktoberfest-accepted
,
therefore counting towards the 4 contributions goal.
- The bot is deployed on Railway
- The official documentation of the Telegram Bot API can be found here
- The library used by the bot to work with Telegram is Java Telegram Bot API
- Video conversion uses FFmpeg and JAVE2
- Image conversion uses Scrimage, ImageIO, and TwelveMonkeys
- Animated sticker validation uses Gson
- MIME type analysis is performed using Apache Tika
The privacy policy can be found here.
See the LICENSE file for license rights and limitations (MIT).