Options

import { Keyboard, Options } from 'degreet-telegram'
import { IContext } from 'degreet-telegram/src/types'

bot.listen(
  ['Hello, world', 'Hello!'],
  async (ctx: IContext): Promise<void> => {
    try {
      await ctx.msg.send(
        ctx.msg.text,
        new Keyboard('under_the_message')
          .btn('callback', 'Button text', 'button_action').row(),
        new Options()
          .disableWebPagePreview()
          .disableNotification()
          .replyTo(ctx.msg.id)
      )
    } catch (e: any) {
      console.error(e)
    }
  }
)

You can also pass the 4th parameter to Keyboard.btn how true, and it will be hide

All types of Keyboard.btn: base for under_the_chat, callback and cb, requestContact, requestLocation, webApp, url, switchInlineQuery

Last updated