@pikokr/command.ts 3.0.6-dev.465bc95 → 3.0.6-dev.be7b9e0
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.
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { BuiltInModule } from './BuiltInModule';
|
|
2
|
-
import { Client, CommandInteraction } from 'discord.js';
|
|
2
|
+
import { Client, CommandInteraction, CommandInteractionOptionResolver } from 'discord.js';
|
|
3
3
|
import { CommandClient } from '../structures';
|
|
4
4
|
export declare class BuiltinSlashCommandConverters extends BuiltInModule {
|
|
5
5
|
private cts;
|
|
6
6
|
client: Client;
|
|
7
7
|
constructor(cts: CommandClient);
|
|
8
8
|
message(interaction: CommandInteraction): CommandInteraction;
|
|
9
|
+
optionResolver(interaction: CommandInteraction): CommandInteractionOptionResolver;
|
|
9
10
|
}
|
|
@@ -22,6 +22,9 @@ class BuiltinSlashCommandConverters extends BuiltInModule_1.BuiltInModule {
|
|
|
22
22
|
message(interaction) {
|
|
23
23
|
return interaction;
|
|
24
24
|
}
|
|
25
|
+
optionResolver(interaction) {
|
|
26
|
+
return interaction.options;
|
|
27
|
+
}
|
|
25
28
|
}
|
|
26
29
|
__decorate([
|
|
27
30
|
command_1.slashArgumentConverter(discord_js_1.CommandInteraction),
|
|
@@ -29,4 +32,10 @@ __decorate([
|
|
|
29
32
|
__metadata("design:paramtypes", [discord_js_1.CommandInteraction]),
|
|
30
33
|
__metadata("design:returntype", void 0)
|
|
31
34
|
], BuiltinSlashCommandConverters.prototype, "message", null);
|
|
35
|
+
__decorate([
|
|
36
|
+
command_1.slashArgumentConverter(discord_js_1.CommandInteractionOptionResolver),
|
|
37
|
+
__metadata("design:type", Function),
|
|
38
|
+
__metadata("design:paramtypes", [discord_js_1.CommandInteraction]),
|
|
39
|
+
__metadata("design:returntype", discord_js_1.CommandInteractionOptionResolver)
|
|
40
|
+
], BuiltinSlashCommandConverters.prototype, "optionResolver", null);
|
|
32
41
|
exports.BuiltinSlashCommandConverters = BuiltinSlashCommandConverters;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BuiltInModule } from './BuiltInModule'
|
|
2
2
|
import { slashArgumentConverter } from '../command'
|
|
3
|
-
import { Client, CommandInteraction } from 'discord.js'
|
|
3
|
+
import { Client, CommandInteraction, CommandInteractionOptionResolver } from 'discord.js'
|
|
4
4
|
import { CommandClient } from '../structures'
|
|
5
5
|
|
|
6
6
|
export class BuiltinSlashCommandConverters extends BuiltInModule {
|
|
@@ -15,4 +15,9 @@ export class BuiltinSlashCommandConverters extends BuiltInModule {
|
|
|
15
15
|
message(interaction: CommandInteraction) {
|
|
16
16
|
return interaction
|
|
17
17
|
}
|
|
18
|
+
|
|
19
|
+
@slashArgumentConverter(CommandInteractionOptionResolver)
|
|
20
|
+
optionResolver(interaction: CommandInteraction): CommandInteractionOptionResolver {
|
|
21
|
+
return interaction.options
|
|
22
|
+
}
|
|
18
23
|
}
|