This repository was archived by the owner on May 22, 2022. It is now read-only.
File tree 1 file changed +33
-0
lines changed 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -18,24 +18,57 @@ type ApplicationCommandOptions<T extends BaseApplicationCommandData> = Applicati
18
18
19
19
declare module '@sapphire/framework' {
20
20
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
+ */
21
29
applicationCommandsHintProvider ?: ( name : string , type : 'chatInput' | 'message' | 'user' ) => Awaitable < ApplicationCommandAdditionalData | undefined | null >
22
30
}
23
31
24
32
class Command {
33
+ /**
34
+ * @since 1.0.0
35
+ */
25
36
public chatInputApplicationRun ?( interaction : CommandInteraction ) : void | Promise < void >
37
+
38
+ /**
39
+ * @since 1.0.0
40
+ */
26
41
public messageApplicationRun ?( interaction : MessageInteraction ) : void | Promise < void >
42
+
43
+ /**
44
+ * @since 1.0.0
45
+ */
27
46
public userApplicationRun ?( interaction : UserContextMenuInteraction ) : void | Promise < void >
28
47
}
29
48
30
49
interface CommandOptions {
50
+ /**
51
+ * @since 1.0.0
52
+ */
31
53
chatInputApplicationOptions ?: ApplicationCommandOptions < ChatInputApplicationCommandData >
54
+
55
+ /**
56
+ * @since 1.0.0
57
+ */
32
58
messageApplicationOptions ?: ApplicationCommandOptions < MessageApplicationCommandData >
59
+
60
+ /**
61
+ * @since 1.0.0
62
+ */
33
63
userApplicationOptions ?: ApplicationCommandOptions < UserApplicationCommandData >
34
64
}
35
65
}
36
66
37
67
declare module '@sapphire/pieces' {
38
68
interface Container {
69
+ /**
70
+ * @since 1.0.0
71
+ */
39
72
applicationCommands : Map < string , ApplicationCommand >
40
73
}
41
74
}
You can’t perform that action at this time.
0 commit comments