Skip to content

Button

Button = ({ id: string; style?: ButtonStyle; url?: never; } | { id?: never; style?: never; url: string; }) & ({ emoji?: string; label: string; } | { emoji: string; label?: string; }) & object

Defined in: utils/button.ts:9

A button on a message. A button with an id runs the handler with that id in the buttons of bot(), and takes a style: primary (default), secondary, success or danger. A button with a url opens the link and needs no handler. A button needs a label, an emoji or both. An emoji is a Unicode emoji, or a custom emoji such as <:name:id>.

optional disabled?: boolean

true greys the button out.