Skip to content

wc.buttonAction()

paige edited this page Aug 28, 2023 · 3 revisions
  • Description: Creates a new button listener.

Parts

  • ctx Event: Context of the button event

Parameters

  • Action Function: What it does when a button is pressed

Setup

wc.buttonAction((ctx) => {
    // action
})

Example

wc.buttonAction((ctx) => {
    if (ctx.customId == "accept") {
        ctx.reply("Accepted!")
    }
});
Clone this wiki locally