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!Solution:Jump to solution
Option A: ( ) https://github.com/skyra-project/skyra/blob/main/src/lib/structures/commands/SkyraCommand.ts#L87-L93
Option B:
```ts...
2 Replies
Solution
Option A: ( ) https://github.com/skyra-project/skyra/blob/main/src/lib/structures/commands/SkyraCommand.ts#L87-L93
Option B:
then access it through
command.options.hidden
but if you want command.hidden
then reference option A