Closed TomerRon closed 2 years ago
:tada: This PR is included in version 3.0.0-beta.4 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This PR is included in version 3.0.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
This PR implements passing a list of subcommands to commands. A command can now either be a
BotCommandWithHandler
(as before) or aBotCommandWithSubcommands
(new).A
BotCommandWithSubcommands
must have an array ofsubcommands: BotCommandWithHandler[]
.In other words, subcommands cannot be nested more than one level deep (according to the Discord API requirements).
See: https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups
Basic example
This adds a
/define
commands with two subcommands,dictionary
andurban
. Usage:/define dictionary <input>
or/define urban <input>
.