Action: receive parameters¶
With this action, you can receive parameters sent through bot commands (and sometimes through buttons) and do whatever you want with them. You don't need to configure it; just by adding it and activating it it's already active.
Let's say you create a command called /ban
and send parameters like the user ID (number) and a message (text):
/ban 123456789 "You have been banned"
You can access the parameters from the ID of this action, followed by .param(parameter position)
, for example:
#ActionID.param1#
(contains the user ID)
#ActionID.param2#
(contains the message)
You can then use this data in all subsequent actions. Additionally, you can pass as many parameters as you want and access them with param(position)
.
Each data type must be respected; for example, numbers and booleans are written as they are, but text and dates must be enclosed in quotes.
Options of the action:¶
This action has no options.
What does the action return through its ID?¶
It returns the parameters passed to the button or command.