I've got some problem with adding local voice file to results array in answerInlineQuery
method of inline_query mode
.
import TelegramBot from 'node-telegram-bot-api'
const bot = new TelegramBot('my bot token', { polling: true })
bot.on('inline_query', query => {
console.log(query)
const results = []
results.push({ id: 4, type: 'article', title: 'article 1', input_message_content: { message_text: 'article 1' } })
results.push({ id: 5, type: 'voice', title: 'voice 1', voice_url: 'voices/1.ogg' })
bot.answerInlineQuery(query.id, results, { cache_time: 10 })
})
bot.answerInlineQuery(query.id, results, { cache_time: 10 })
I know, that voice_url
is useless for file path, but i don't see any other opportunity to add it.
I'd like to know if it is possible at all in inline mode, because non-inline method SendVoice
supports this function.