error while handling the command application command registry

Hello. I have encountered a (weird) bug on SlashCommandBuilder. This one works, no ExpectedValidationError > s.instance(V) error.
public override registerApplicationCommands(registry: Command.Registry) {
registry.registerChatInputCommand((builder) =>
builder
.setName(this.name)
.setDescription(this.description)
.addStringOption((option) => option.setName('hello').setDescription('hello').setRequired(true))
);
}
public override registerApplicationCommands(registry: Command.Registry) {
registry.registerChatInputCommand((builder) =>
builder
.setName(this.name)
.setDescription(this.description)
.addStringOption((option) => option.setName('hello').setDescription('hello').setRequired(true))
);
}
This one didn't work. It has ExpectedValidationError > s.instance(V) error.
public override registerApplicationCommands(registry: Command.Registry) {
registry.registerChatInputCommand((builder) =>
builder
.setName(this.name)
.setDescription(this.description)
.addStringOption(new SlashCommandStringOption().setName('hello').setDescription('hello').setRequired(true))
);
}
public override registerApplicationCommands(registry: Command.Registry) {
registry.registerChatInputCommand((builder) =>
builder
.setName(this.name)
.setDescription(this.description)
.addStringOption(new SlashCommandStringOption().setName('hello').setDescription('hello').setRequired(true))
);
}
NOTE: I can use the first one but I like the simplicity of the second one.
No description
Solution:
You'll have to report this to discordjs because this is a shapeshift validation error raised in @discordjs/builders. If they direct you back here because it's @sapphire/shapeshift, tell them that it's code in builders and not shapeshift that causes this.
Jump to solution
2 Replies
Solution
Favna
Favna4mo ago
You'll have to report this to discordjs because this is a shapeshift validation error raised in @discordjs/builders. If they direct you back here because it's @sapphire/shapeshift, tell them that it's code in builders and not shapeshift that causes this.
Tiaansu
TiaansuOP4mo ago
Alright, thanks!
Want results from more Discord servers?
Add your server