mullwar / telebot

The easy way to write Telegram bots in Node.js
https://www.npmjs.com/package/telebot
MIT License
1.48k stars 270 forks source link

Sticker gets sent as an image file #209

Open xypnox opened 3 years ago

xypnox commented 3 years ago

The example from the readme for sending a sticker at a URL sends the sticker as an image file on both desktop and phone.

The relevant code:

bot.on('sticker', (msg) => {
    return msg.reply.sticker('http://i.imgur.com/VRYdhuD.png', { asReply: true });
});

Removing asReply resulted in the same messages.

Screenshot (first with asReply, second without):

image

PS: Please ignore the first sticker :|

ghost commented 3 years ago

As mentioned in the README, sendSticker seems only to work with .webp files

Use this method to send .webp stickers.

The official Telegram docs also only mention .webp files

sendSticker Use this method to send static .WEBP or animated .TGS stickers. On success, the sent Message is returned.