{{define "cp_custom_commands_edit_cmd"}}
{{template "cp_head" .}}
Custom commands
Available template data is {{template "template_helper_user"}} (and much more)
Execute bot commands using
{{`{{exec "command" "arg1" "arg2"}}`}}
, Example:
{{"{{exec \"role\" \"yagpdb\"}}"}}
will be the same as the user typing
(mention or prefix) role yagpdb
Arguments are available in a string array: .CmdArgs
Access
single arguments by index using {{"{{index .CmdArgs 0}}"}}
Get the number of
arguments using {{"{{len .CmdArgs}}"}}
Loop over them with
{{"{{range .CmdArgs}}{{.}}"}} <- that dot will be replaced by the current argument we're looping over{{"{{end}}"}}
"end"
marks the end of the for loop.
See the templating and custom command docs for more info and join the support server if you have further questions. Custom commands for yagpdb are rather complicated for the time being.
YAGPDB will pick one message at random from all configured responses.