Trying to answer inline query with the sticker cause error 400 Bad Request: STICKER_DOCUMENT_INVALID
.
My response looks like following
const sticker = {
type: 'sticker',
id: '0',
sticker_file_id: 'file_id_obtained_from_upload_sticker_method'
};
ctx.telegram.answerInlineQuery(query.id, [sticker]);
In according to Telegram documentation here and Telegraf documentation here everything seems to be right. In reality:
{
code: 400,
response: {
ok: false,
error_code: 400,
description: 'Bad Request: STICKER_DOCUMENT_INVALID'
},
description: 'Bad Request: STICKER_DOCUMENT_INVALID',
parameters: {},
on: {
method: 'answerInlineQuery',
payload: { inline_query_id: '3997901566750938248', results: [Array] }
}
}
No answer in google nor official documentation. Anyone has similar experience?
The sticker was previously successfully uploaded with method uploadStickerFile provided url to request image file.
sticker_id
that stored in sticker set in telegram, maybe it just answer with a sticker in telegram sticker set. As uploadstickerfile in Telegram official doc "Use this method to upload a .PNG file with a sticker for later use in createNewStickerSet and addStickerToSet methods" – Devault