Button Click

This trigger type, will detect when a user clicks a button. The button has to be sent by the bot.

Example of a button:

Syntax

In order for button command to work, there must be button ID to be matched specified. Here's how you can provide it:

NameSyntaxExampleExplanation
Single IDbutton IDstaff-appDetects a button with "staff-app" ID
Multiple IDsbuttonID|buttonIDApple|Banana|OrangeMatches a buttons with IDs: "Apple", "Banana", or "Orange"
Regex/RegExp//User-\d{18,}/Will trigger on any following the pattern "User-ID" like "User-434342521997492224"

Capitalization

All button IDs are CASE SENSITIVE, so a if a command doesn't trigger, check the capitalization!

Tricky behavior

Button commands use regex to match the button ID, so commands with IDs with similiar beginnings may interfere.

For Example:

Let's say we have two buttons with the following IDs:

  • test
  • testone

If we had a command Button: test both buttons will trigger it.

Resolving the Problem

Just change your id to ^id$ In regex ^ and $ are used to match the start and end of the string.

More Info

Do you want to know more, about the bot's syntax? You can check out this page to learn more!