Gramjs button example

 avatar
unknown
typescript
2 years ago
289 B
34
Indexable
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}`)];
    })
  ),
});
Editor is loading...