@pikokr/command.ts 3.0.8-dev.3955b1f → 3.0.8-dev.3c7dd97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -7,7 +7,7 @@ export declare class CommandCheckFailed extends Error {
|
|
|
7
7
|
constructor(msg: Message, command: Command);
|
|
8
8
|
}
|
|
9
9
|
export declare class SlashCommandCheckFailed extends Error {
|
|
10
|
-
|
|
10
|
+
interaction: CommandInteraction;
|
|
11
11
|
command: SlashCommand;
|
|
12
|
-
constructor(
|
|
12
|
+
constructor(interaction: CommandInteraction, command: SlashCommand);
|
|
13
13
|
}
|
|
@@ -10,9 +10,9 @@ class CommandCheckFailed extends Error {
|
|
|
10
10
|
}
|
|
11
11
|
exports.CommandCheckFailed = CommandCheckFailed;
|
|
12
12
|
class SlashCommandCheckFailed extends Error {
|
|
13
|
-
constructor(
|
|
13
|
+
constructor(interaction, command) {
|
|
14
14
|
super();
|
|
15
|
-
this.
|
|
15
|
+
this.interaction = interaction;
|
|
16
16
|
this.command = command;
|
|
17
17
|
}
|
|
18
18
|
}
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ export class CommandCheckFailed extends Error {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export class SlashCommandCheckFailed extends Error {
|
|
12
|
-
constructor(public
|
|
12
|
+
constructor(public interaction: CommandInteraction, public command: SlashCommand) {
|
|
13
13
|
super()
|
|
14
14
|
}
|
|
15
15
|
}
|
package/test/modules/dev.ts
CHANGED
|
@@ -8,7 +8,7 @@ export class Dev extends BuiltInModule {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
@listener('slashCommandError')
|
|
11
|
-
|
|
11
|
+
slashError(e: Error, i: CommandInteraction) {
|
|
12
12
|
if (e instanceof SlashCommandCheckFailed) {
|
|
13
13
|
return i.reply({
|
|
14
14
|
content: 'Command before-run check failed',
|