CommandGroup
implementsMiddlewareChainer<M, C>
Description
Example
const group = new CommandGroup()
.match(matchPrefixes("!"))
.setCommands(sumCommand)
// Input: "!sum 2 2"
// Output: "The sum is: 4"
// Input: "!something"
// Output: nothing
// Input: "?sum 5 3"
// Output: nothing
Generics
M
C
D
S
Properties
Methods
setCommands(commands)this
Set the commands for this CommandGroup
Parameters
commands:
CommandLike<M, C>[]setMetadata(data)CommandGroup<M, C, T, S>
Parameters
data:
Tuse(middleware)CommandGroup<M, C, D, T & S>
Add Middleware. The order that you call this is the order the middleware will be in
Parameters
middleware:
Middleware<T & S, M, C>Command
Middleware