Odd TypeScript Error with D.JSv13.7

Type 'Omit<SlashCommandBuilder, "addSubcommand" | "addSubcommandGroup">' is missing the following properties from type 'SlashCommandBuilder': addSubcommandGroup, addSubcommand, _sharedAddOptionMethodts(2739)
3 Replies
oxi
oxiOP3y ago
this.command_name = 'ping2'
this.command_info = new SlashCommandBuilder()
.setName(this.command_name)
.setDescription('This is the ping command!')
.addStringOption(option =>
option.setName('test')
.setDescription('test1')
.setRequired(true)
);
this.command_name = 'ping2'
this.command_info = new SlashCommandBuilder()
.setName(this.command_name)
.setDescription('This is the ping command!')
.addStringOption(option =>
option.setName('test')
.setDescription('test1')
.setRequired(true)
);
it works perfectly fine without the .addStringOption property readonly command_info: SlashCommandBuilder; @qjuh
Gorniaky
Gorniaky3y ago
SlashCommandBuilder |
SlashCommandSubcommandsOnlyBuilder |
Omit<SlashCommandBuilder, 'addSubcommand' | 'addSubcommandGroup'>;
SlashCommandBuilder |
SlashCommandSubcommandsOnlyBuilder |
Omit<SlashCommandBuilder, 'addSubcommand' | 'addSubcommandGroup'>;
oxi
oxiOP3y ago
yeah that fixed it, thanks @gorniaky
Want results from more Discord servers?
Add your server