Welcome to the TStickers tutorial! Follow these steps to get up and running with TStickers. This guide will walk you through setting up a Telegram bot, retrieving sticker pack URLs, and using TStickers to download and convert stickers.
- Step 1 - Send a message to @BotFather
- Step 2 - Create a File Called 'env'
- Step 3 - Get the URL of the Telegram Sticker Pack(s)
- Step 4 - Use TStickers
To start using TStickers, you need to create a Telegram bot. Follow these steps to obtain your bot token:
-
Create a Telegram Account: If you don’t already have one, download the Telegram app and sign up.
-
Contact @BotFather: Open Telegram and search for the user
@BotFather
. This is the official bot for managing other bots on Telegram. -
Create a New Bot:
- Send the command
/newbot
to @BotFather. - Follow the prompts to provide a name for your bot (e.g.,
TestBot
) and a username (e.g.,test_bot
).
- Send the command
-
Receive Your Token: @BotFather will reply with a message containing your bot’s API token. Keep this token safe, as you'll need it for the next steps.
To store your bot token securely, you need to create a configuration file:
-
Create the File:
- Create a new text file in the same directory where you'll run TStickers.
- Name the file
env
orenv.txt
.
-
Add Your Token:
- Open the file and paste your bot token into it.
Example
env.txt
:14************
To use TStickers, you'll need the URL of the sticker pack(s) you want to download. You can get this URL in two ways:
-
Search for the Sticker Pack:
- Open your web browser and search for the sticker pack by name (e.g.,
Telegram Donut The Dog
).
- Open your web browser and search for the sticker pack by name (e.g.,
-
Copy the URL:
- Find the sticker pack link and copy its URL. It should look something like
https://t.me/addstickers/DonutTheDog
.
- Find the sticker pack link and copy its URL. It should look something like
-
Find the Sticker Pack:
- Open the Telegram app, search for the sticker pack, and open it.
-
Copy the Link:
- Tap on the sticker pack’s name or menu options and select "Share" or "Copy Link" (on mobile devices). The URL will be copied to your clipboard.
Example URL:
https://t.me/addstickers/DonutTheDog
Now you’re ready to use TStickers to download and convert stickers from the URL you obtained:
-
Install TStickers:
- Run the following command in your terminal:
python3 -m pip install tstickers
- Run the following command in your terminal:
-
Run TStickers:
- Start the program by executing:
python3 -m tstickers
- Start the program by executing:
-
Enter the Sticker Pack URL:
- When prompted, paste the URL of the sticker pack and press Enter.
-
Check the Output:
- TStickers will download and convert the stickers. The output will be saved in the
downloads
folder.
Example output:
$ tstickers Enter sticker_set url (leave blank to stop): https://t.me/addstickers/DonutTheDog Enter sticker_set url (leave blank to stop): INFO | ============================================================ INFO | Starting to scrape "DonutTheDog" .. INFO | Time taken to scrape 31 stickers - 0.044s INFO | INFO | ------------------------------------------------------------ INFO | Starting download of "donutthedog" into downloads\donutthedog INFO | Time taken to download 31 stickers - 0.157s INFO | INFO | ------------------------------------------------------------ INFO | -> Cache miss for DonutTheDog! INFO | Converting stickers "DonutTheDog"... INFO | Time taken to convert 31 stickers (tgs) - 60.970s INFO | INFO | Time taken to convert 31 stickers (webp) - 0.447s INFO | INFO | Time taken to convert 62 stickers (total) - 61.434s INFO |
- TStickers will download and convert the stickers. The output will be saved in the