1

I can not find in the docs how to disable the annoying link preview. Anyone knows how to?

const { Extra} = require('telegraf')
bot.reply('Hello http://github.com', Extra.webPreview(false))

I have tried above code but showing Extra as Undefined. Also how to disable link preview using ctx.replyWithHTML() method ?

1 Answers1

2

I am hoping that you are using Telegraf V4 or later.

Extra isn't available in Telegraf V4.

bot.replyWithHTML(`Your Message`, { 
    disable_web_page_preview: true 
})

Also the difference between reply & replyWithHTML is with replyWithHTML enables the parse_mode as HTML

ArnabXD
  • 480
  • 1
  • 6
  • 14