Gramjs button example

mail@pastecode.io avatar
unknown
typescript
a year ago
289 B
11
Indexable
Never
const options = ["About Me", "Help", "Close"];

const messageWithButton = await bot.sendMessage(chatId, {
  message: "Please select one option",
  buttons: bot.buildReplyMarkup(
    options.map((option) => {
      return [Button.inline(option, `callback data ${option}`)];
    })
  ),
});