Recognising "hidden" in CommandOptions

Hello, I realise this is more a TypeScript question than a Sapphire question. What type should I add to the options parameter to make it recognise hidden: boolean? I was thinking something like options: Command.Options & {hidden: boolean} but it didn't work. Thanks!
2 Replies
Solution
Favna
Favna2y ago
Option A: ( this ) https://github.com/skyra-project/skyra/blob/main/src/lib/structures/commands/SkyraCommand.ts#L87-L93 Option B:
declare module '@sapphire/framework' {
export interface CommandOptions {
hidden?: boolean;
}
}
declare module '@sapphire/framework' {
export interface CommandOptions {
hidden?: boolean;
}
}
then access it through command.options.hidden but if you want command.hidden then reference option A
Want results from more Discord servers?
Add your server