This trigger type, will detect when a user clicks a button. The button has to be sent by the bot.
Example of a button:
In order for button command to work, there must be button ID to be matched specified. Here's how you can provide it:
|Single ID||Detects a button with "staff-app" ID|
|Multiple IDs||Matches a buttons with IDs: "Apple", "Banana", or "Orange"|
|Regex||Will trigger on any following the pattern "User-ID" like "User-434342521997492224"|
All button IDs are CASE SENSITIVE, so a if a command doesn't trigger, check the capitalization!
Button commands use regex to match the button ID, so commands with IDs with similiar beginnings may interfere.
Let's say we have two buttons with the following IDs:
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.
- $button - sends a button
- $buttonID - returns the button id
- $buttonEmoji - returns the button emoji
- $buttonLabel - returns the button label
- $buttonURL - returns the button url
- $buttonStyle - returns the button style
- $buttonIsDisabled - returns whetheer the button disabled
Do you want to know more, about the bot's syntax? You can check out this page to learn more!