#What type should I use here?

1 messages · Page 1 of 1 (latest)

formal coyote
#

Hey, I am making a function that adds a command. It works fine, except that SlashCommandBuilder#add___Option creates an Omit instead of a SlashCommandBuilder

Since I'm using TypeScript, what should I put as the type?

export const addCommand = (
    command: discord.SlashCommandBuilder, // <-- [HERE]
    run: (interaction: discord.CommandInteraction, config: classes.CommandConfig) => void,
    autoDefer: boolean = true
): void => {
    commands.push({ data: command, run: run, autoDefer: autoDefer });
};
stuck reef
#

SlashCommandBuilder

formal coyote
#

No matter, my question was resolved in the main channel