expert i: static button responders

we're going to learn more about button responders, which is a subtype of autoresponders.

what are button responders?

  • button responders are a "type" of autoresponder. so far, in this guide, we've only touched on message autoresponders, where the bot will always respond to a message.

  • instead: button responders respond to a click of a button.

  • it has a near-mirror functionality to autoresponders, accessing to almost all variables, but can be used in tandem with autoresponders, allowing different branches of user input.

static button responders are buttons that stay in a channel over a long period of time and will be clicked by more than one person, such as verification buttons on rules, button roles, etc.

your first button responder

let's start by making your first button responder! you can do so with /buttonresponder add. as you run the command, you'll find a couple settings:

  • name : this is similar to an embed name - it's just a reference id that'll be used when you create, edit, delete or send it

  • reply : this is mimu's response when someone clicks the button - similar to the autoresponder raw reply.

  • displayed on the button:

    • label : this refers to the text that's on the button. not to be confused with name!

    • emoji: this refers to the emoji that's on the left of the button.

    • you must have a label, emoji or both on the button

    • color: this refers to the color of the label; which is available in four colors: blue, green, grey and red. it defaults to blue.

other settings like limitations and invoker_only will be discussed in expert ii: instantiated buttons. for now - ignore them.

making a button that adds a role

for your first button responder, we're going to make a button that adds a role, with the {addrole:} function.

/buttonresponder add name:role_panel1 reply:{addrole:@pink}{embed} you now have the pink role! label:pink color:grey emoji::pink_heart:

  • you'll notice that once you create a button responder, it shows options similar to a normal message auto responder.

  • it also creates the button below it to allow you to test it then and there!

creating multiple buttons

now that you've created your first button, let's create a couple more! in this example, we're going to make a simple panel of buttons for color roles.

  1. first, we're going to update the pink button we made earlier:

    /buttonresponder edit reply name:role_panel1 reply:{addrole:@pink}{removerole:@blue}{removerole:@yellow}{embed} you now have the @pink role !

  2. and then we're going to add two more buttons for each color:

    /buttonresponder add name:role_panel2 reply:{addrole:@blue}{removerole:@pink}{removerole:@yellow}{embed} you now have the @blue role ! label:blue emoji::blue_heart: color:grey

    /buttonresponder add name:role_panel3 reply:{addrole:@yellow}{removerole:@pink}{removerole:@blue}{embed} you now have the @yellow role ! label:yellow emoji::yellow_heart: color:grey

  1. then, we're going to use a premade embed to make it look cute!

    /embed create choose_color

using /send command to post static button responders

  • to post a role panel (which consists of an embed and buttons), we're going to use the /send command, combining all of the buttons and embed we made into one message.

    • to attach the button, we'll use {addbutton:button_name}

/send content:{embed:choose_color}{addbutton:role_panel1}{addbutton:role_panel2}{addbutton:role_panel3} channel:#choose-roles

  • when sent successfully, #choose-roles channel looks like this:

  • and here's what it looks like in action!

Last updated