I'm writing a Telegram bot and I want it to send a sticker.
It is said here, that to send a sticker that already exists on Telegram servers we can simply pass file_id. The thing is, I have absolutely no idea how to obtain file_id of any sticker. E.g. how do I send any sticker from Greater Minds pack? I suppose, this pack is on Telegram servers since they include it in every app.
One of the main reasons why stickers are not showing on Telegram is if you haven't added them yet on your device. If you switch to a new device, you'll have to redownload your stickers before you can use them.
Can I delete a sticker pack? If you want to remove a pack from your collection, go to Settings > Chat Settings > Stickers and Masks and tap the three dots next to the pack you want to remove. If you want to completely delete a pack you created, Stickers bot (t.me/stickers) can help you do that.
Telegram, a popular secure messaging app, is unique in that it actually lets you upload and use your own stickers in conversations. You can create sticker packs and show them off as much as you want.
To discover a sticker's file_id
:
Send the sticker from Telegram App to your bot.
Use the bot's getUpdates
method to receive the sticker. You should see the sticker's file_id
in the message.
Your bot may use that file_id
to send the same sticker to another user. Be careful; in the message there is a thumb
field, which also has a file_id
. Do not use that one to send the sticker. It won't work.
Another possibility, of which you may be aware, is that you can always download the sticker image to a disk file, then use that file as the sticker
parameter for sendSticker
method, equivalent to uploading the file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With