Skip to content
This repository was archived by the owner on May 22, 2022. It is now read-only.

Commit 7b803b7

Browse files
committed
docs: add comments to document module augments
1 parent a1f24f6 commit 7b803b7

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

src/main.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,57 @@ type ApplicationCommandOptions<T extends BaseApplicationCommandData> = Applicati
1818

1919
declare module '@sapphire/framework' {
2020
interface SapphireClientOptions {
21+
/**
22+
* @description For each application command, the function will be called to get its `guildIds` and/or `idHints`.
23+
*
24+
* @param name Name of the command piece, **not** the application command name.
25+
* @param type Type of application command.
26+
*
27+
* @since 1.1.0
28+
*/
2129
applicationCommandsHintProvider?: ( name: string, type: 'chatInput' | 'message' | 'user' ) => Awaitable<ApplicationCommandAdditionalData | undefined | null>
2230
}
2331

2432
class Command {
33+
/**
34+
* @since 1.0.0
35+
*/
2536
public chatInputApplicationRun?( interaction: CommandInteraction ): void | Promise<void>
37+
38+
/**
39+
* @since 1.0.0
40+
*/
2641
public messageApplicationRun?( interaction: MessageInteraction ): void | Promise<void>
42+
43+
/**
44+
* @since 1.0.0
45+
*/
2746
public userApplicationRun?( interaction: UserContextMenuInteraction ): void | Promise<void>
2847
}
2948

3049
interface CommandOptions {
50+
/**
51+
* @since 1.0.0
52+
*/
3153
chatInputApplicationOptions?: ApplicationCommandOptions<ChatInputApplicationCommandData>
54+
55+
/**
56+
* @since 1.0.0
57+
*/
3258
messageApplicationOptions?: ApplicationCommandOptions<MessageApplicationCommandData>
59+
60+
/**
61+
* @since 1.0.0
62+
*/
3363
userApplicationOptions?: ApplicationCommandOptions<UserApplicationCommandData>
3464
}
3565
}
3666

3767
declare module '@sapphire/pieces' {
3868
interface Container {
69+
/**
70+
* @since 1.0.0
71+
*/
3972
applicationCommands: Map<string, ApplicationCommand>
4073
}
4174
}

0 commit comments

Comments
 (0)