D
D
dpsnk2016-10-18 11:52:38
Python
dpsnk, 2016-10-18 11:52:38

Is it possible to make a telegram bot respond with stickers?

Is it possible to make the bot respond with stickers to messages, if so, how to implement it?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
Rick_Mint, 2021-02-11
@Rick_Mint

If you use either PyTelegramBotAPI, then write:
bot.send_sticker(message.chat.id, "sticker ID")
or
sticker=open("path to the sticker on the machine (for example: D:\\telebot\\stickers\\stick_name.webp )", "rb")
bot.send_sticker(message.chat.id, sticker)

1) Stickers must be an image in .webp format and have no more than 512 pixels in width and height ( if you decide to use the second method )
2) ID you can find out the sticker by sending it to @idstickerbot ( if you decide to use the first method )

N
nllm, 2016-10-18
@nllm

Do you mean sound?
Can. Generate a record (file) on the server and send it to the user. But there is no autoplay, i.e. the user will manually start playing the sound

A
Andrey K, 2016-10-18
@mututunus

https://core.telegram.org/bots/api#sendsticker

I
Ivan, 2016-10-25
@trak_ivan

Yes, you send the sticker id in the desired function. You can see the sticker id in getupdates

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question