Skip to content

$commandsList

$commandsList returns a list of commands, optionally formatted and separated.

Usage

$commandsList[format?;sep?;excludeFunctions?]

Parameters

FieldTypeDescriptionRequired
format?stringFormat for each command. Supports {name}, {description} and other parsers. Default: {name}false
sep?stringSeparator between commands in the list. Default: , false
excludeFunctions?booleanWhether to exclude functions (commands starting with $). Default: truefalse

Example(s)

This will list all commands by name, separated by a comma:

1
client.command({
2
name: "allCommands",
3
code: `
4
$commandsList
5
`
6
});

This will list commands with their name and description, separated by a semicolon:

1
client.command({
2
name: "commandsWithDesc",
3
code: `
4
$commandsList[{name} - {description}; ;false]
5
`
6
});