Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue with inline photos #1151

Open
crycime opened this issue Nov 16, 2023 · 0 comments
Open

issue with inline photos #1151

crycime opened this issue Nov 16, 2023 · 0 comments

Comments

@crycime
Copy link

crycime commented Nov 16, 2023

There is an issue with inline photos, as I'm unable to display the title and description in answerInline. Below is a code demo:"

import TelegramBot from 'node-telegram-bot-api'
;(async () => {
  const bot = new TelegramBot('', {
    polling: true
  })
  bot.onText(/\/share/, msg => {
    const chatId = msg.chat.id
    bot.sendMessage(chatId, 'Click on the button below:', {
      reply_markup: {
        inline_keyboard: [[{ text: 'share', switch_inline_query: '' }]]
      }
    })
  })

  bot.on('inline_query', query => {
    const inlineQueryId = query.id
    bot.answerInlineQuery(inlineQueryId, [
      {
        type: 'photo',
        id: '81',
        photo_width: 48,
        photo_height: 48,
        photo_url:
          'https://ipfs.io/ipfs/bafybeie724zvyylvhup2dt6qi2koccocopxtidxsclo67neewluiyuupsu/6625eddb-956e-4879-b053-d627c41eb446.jpg',
        thumb_url:
          'https://ipfs.io/ipfs/bafybeie724zvyylvhup2dt6qi2koccocopxtidxsclo67neewluiyuupsu/6625eddb-956e-4879-b053-d627c41eb446.jpg',
        title: 'title',
        description: 'description',
        caption: '👏👏👏 Welcome'
      }
    ])
  })
})()

WechatIMG579

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant