Custom Command Arguments
Arguments in Custom Commands allow MEE6 to copy text you send while using the command.
Arguments of a command are pieces of text that are placed just after the command. They are separated by one or multiple spaces.
For example if you type !my-command @Mario#0001 sun moon:
The command would be my-command
1st argument would be @Mario#0001
2nd argument would be sun
3rd argument would be moon.
In the custom command response you can write {1} to copy the 1st argument, {2} to copy the second argument, etc...
You can also use ... to copy a range of arguments.
By combining them you can do for exemple:
{1...} to copy all the arguments
{...3} to copy the first 3 arguments
{2...6} to copy arguments from the 2nd to 6th
By adding :default text at the end of the code, you can add a default value for when the argument is not specified by the user.
For example: {3:this is the default value of the third argument}
If no default value is set, the bot will copy the code to indicate how to use the command.
If you have any issues with custom command arguments, do not hesitate to join our support server ✌️
What is exactly an argument?
Arguments of a command are pieces of text that are placed just after the command. They are separated by one or multiple spaces.
For example if you type !my-command @Mario#0001 sun moon:
The command would be my-command
1st argument would be @Mario#0001
2nd argument would be sun
3rd argument would be moon.
How it works
In the custom command response you can write {1} to copy the 1st argument, {2} to copy the second argument, etc...
You can also use ... to copy a range of arguments.
By combining them you can do for exemple:
{1...} to copy all the arguments
{...3} to copy the first 3 arguments
{2...6} to copy arguments from the 2nd to 6th
Default values
By adding :default text at the end of the code, you can add a default value for when the argument is not specified by the user.
For example: {3:this is the default value of the third argument}
If no default value is set, the bot will copy the code to indicate how to use the command.
If you have any issues with custom command arguments, do not hesitate to join our support server ✌️
Updated on: 22/02/2020
Thank you!