mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 13:03:31 +01:00
refactor: move full validation to ChatInputCommandBuilder (#11304)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -379,21 +379,9 @@ describe('ChatInput Commands', () => {
|
||||
describe('Subcommand builder and subcommand group builder', () => {
|
||||
test('GIVEN both types THEN does not throw error', () => {
|
||||
expect(() =>
|
||||
getBuilder()
|
||||
.setName('test')
|
||||
.setDescription('Test command')
|
||||
.addSubcommands((subcommand) =>
|
||||
subcommand.setName('subcommand').setDescription('Description of subcommand'),
|
||||
)
|
||||
.addSubcommandGroups((subcommandGroup) =>
|
||||
subcommandGroup
|
||||
.setName('group')
|
||||
.setDescription('Description of group')
|
||||
|
||||
.addSubcommands((subcommand) =>
|
||||
subcommand.setName('subcommand').setDescription('Description of group subcommand'),
|
||||
),
|
||||
)
|
||||
getNamedBuilder()
|
||||
.addSubcommands(getSubcommand())
|
||||
.addSubcommandGroups(getSubcommandGroup().addSubcommands(getSubcommand()))
|
||||
.toJSON(),
|
||||
).not.toThrowError();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user