@discordjs/builders 0.6.0 → 0.8.2
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.
- package/LICENSE +1 -0
- package/README.md +28 -8
- package/dist/index.d.ts +818 -15
- package/dist/index.js +4 -19
- package/dist/index.js.map +7 -1
- package/dist/index.mjs +4 -36
- package/dist/index.mjs.map +7 -0
- package/package.json +63 -51
- package/dist/index.d.ts.map +0 -1
- package/dist/interactions/slashCommands/Assertions.d.ts +0 -12
- package/dist/interactions/slashCommands/Assertions.d.ts.map +0 -1
- package/dist/interactions/slashCommands/Assertions.js +0 -63
- package/dist/interactions/slashCommands/Assertions.js.map +0 -1
- package/dist/interactions/slashCommands/SlashCommandBuilder.d.ts +0 -63
- package/dist/interactions/slashCommands/SlashCommandBuilder.d.ts.map +0 -1
- package/dist/interactions/slashCommands/SlashCommandBuilder.js +0 -113
- package/dist/interactions/slashCommands/SlashCommandBuilder.js.map +0 -1
- package/dist/interactions/slashCommands/SlashCommandSubcommands.d.ts +0 -64
- package/dist/interactions/slashCommands/SlashCommandSubcommands.d.ts.map +0 -1
- package/dist/interactions/slashCommands/SlashCommandSubcommands.js +0 -123
- package/dist/interactions/slashCommands/SlashCommandSubcommands.js.map +0 -1
- package/dist/interactions/slashCommands/mixins/CommandOptionBase.d.ts +0 -20
- package/dist/interactions/slashCommands/mixins/CommandOptionBase.d.ts.map +0 -1
- package/dist/interactions/slashCommands/mixins/CommandOptionBase.js +0 -48
- package/dist/interactions/slashCommands/mixins/CommandOptionBase.js.map +0 -1
- package/dist/interactions/slashCommands/mixins/CommandOptionWithChoices.d.ts +0 -25
- package/dist/interactions/slashCommands/mixins/CommandOptionWithChoices.d.ts.map +0 -1
- package/dist/interactions/slashCommands/mixins/CommandOptionWithChoices.js +0 -71
- package/dist/interactions/slashCommands/mixins/CommandOptionWithChoices.js.map +0 -1
- package/dist/interactions/slashCommands/mixins/CommandOptions.d.ts +0 -54
- package/dist/interactions/slashCommands/mixins/CommandOptions.d.ts.map +0 -1
- package/dist/interactions/slashCommands/mixins/CommandOptions.js +0 -91
- package/dist/interactions/slashCommands/mixins/CommandOptions.js.map +0 -1
- package/dist/interactions/slashCommands/mixins/NameAndDescription.d.ts +0 -15
- package/dist/interactions/slashCommands/mixins/NameAndDescription.d.ts.map +0 -1
- package/dist/interactions/slashCommands/mixins/NameAndDescription.js +0 -42
- package/dist/interactions/slashCommands/mixins/NameAndDescription.js.map +0 -1
- package/dist/interactions/slashCommands/options/boolean.d.ts +0 -7
- package/dist/interactions/slashCommands/options/boolean.d.ts.map +0 -1
- package/dist/interactions/slashCommands/options/boolean.js +0 -18
- package/dist/interactions/slashCommands/options/boolean.js.map +0 -1
- package/dist/interactions/slashCommands/options/channel.d.ts +0 -7
- package/dist/interactions/slashCommands/options/channel.d.ts.map +0 -1
- package/dist/interactions/slashCommands/options/channel.js +0 -18
- package/dist/interactions/slashCommands/options/channel.js.map +0 -1
- package/dist/interactions/slashCommands/options/integer.d.ts +0 -7
- package/dist/interactions/slashCommands/options/integer.d.ts.map +0 -1
- package/dist/interactions/slashCommands/options/integer.js +0 -18
- package/dist/interactions/slashCommands/options/integer.js.map +0 -1
- package/dist/interactions/slashCommands/options/mentionable.d.ts +0 -7
- package/dist/interactions/slashCommands/options/mentionable.d.ts.map +0 -1
- package/dist/interactions/slashCommands/options/mentionable.js +0 -18
- package/dist/interactions/slashCommands/options/mentionable.js.map +0 -1
- package/dist/interactions/slashCommands/options/number.d.ts +0 -7
- package/dist/interactions/slashCommands/options/number.d.ts.map +0 -1
- package/dist/interactions/slashCommands/options/number.js +0 -18
- package/dist/interactions/slashCommands/options/number.js.map +0 -1
- package/dist/interactions/slashCommands/options/role.d.ts +0 -7
- package/dist/interactions/slashCommands/options/role.d.ts.map +0 -1
- package/dist/interactions/slashCommands/options/role.js +0 -18
- package/dist/interactions/slashCommands/options/role.js.map +0 -1
- package/dist/interactions/slashCommands/options/string.d.ts +0 -7
- package/dist/interactions/slashCommands/options/string.d.ts.map +0 -1
- package/dist/interactions/slashCommands/options/string.js +0 -18
- package/dist/interactions/slashCommands/options/string.js.map +0 -1
- package/dist/interactions/slashCommands/options/user.d.ts +0 -7
- package/dist/interactions/slashCommands/options/user.d.ts.map +0 -1
- package/dist/interactions/slashCommands/options/user.js +0 -18
- package/dist/interactions/slashCommands/options/user.js.map +0 -1
- package/dist/messages/embed/Assertions.d.ts +0 -23
- package/dist/messages/embed/Assertions.d.ts.map +0 -1
- package/dist/messages/embed/Assertions.js +0 -26
- package/dist/messages/embed/Assertions.js.map +0 -1
- package/dist/messages/embed/Embed.d.ts +0 -140
- package/dist/messages/embed/Embed.d.ts.map +0 -1
- package/dist/messages/embed/Embed.js +0 -300
- package/dist/messages/embed/Embed.js.map +0 -1
- package/dist/messages/formatters.d.ts +0 -198
- package/dist/messages/formatters.d.ts.map +0 -1
- package/dist/messages/formatters.js +0 -181
- package/dist/messages/formatters.js.map +0 -1
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ApplicationCommandOptionWithChoicesBase = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
require("discord-api-types/v9");
|
|
6
|
-
const ow_1 = tslib_1.__importDefault(require("ow"));
|
|
7
|
-
const Assertions_1 = require("../Assertions");
|
|
8
|
-
const CommandOptionBase_1 = require("./CommandOptionBase");
|
|
9
|
-
const stringPredicate = ow_1.default.string.minLength(1).maxLength(100);
|
|
10
|
-
const integerPredicate = ow_1.default.number.finite;
|
|
11
|
-
// TODO: See resolution for sindresorhus/ow#217 in relation to this cast
|
|
12
|
-
const choicesPredicate = ow_1.default.array.ofType(ow_1.default.array.exactShape([stringPredicate, ow_1.default.any(ow_1.default.string, integerPredicate)]));
|
|
13
|
-
class ApplicationCommandOptionWithChoicesBase extends CommandOptionBase_1.SlashCommandOptionBase {
|
|
14
|
-
constructor() {
|
|
15
|
-
super(...arguments);
|
|
16
|
-
Object.defineProperty(this, "choices", {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
configurable: true,
|
|
19
|
-
writable: true,
|
|
20
|
-
value: void 0
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Adds a choice for this option
|
|
25
|
-
* @param name The name of the choice
|
|
26
|
-
* @param value The value of the choice
|
|
27
|
-
*/
|
|
28
|
-
addChoice(name, value) {
|
|
29
|
-
this.choices ?? (this.choices = []);
|
|
30
|
-
Assertions_1.validateMaxChoicesLength(this.choices);
|
|
31
|
-
// Validate name
|
|
32
|
-
ow_1.default(name, `${ApplicationCommandOptionTypeNames[this.type]} choice name`, stringPredicate);
|
|
33
|
-
// Validate the value
|
|
34
|
-
if (this.type === 3 /* String */)
|
|
35
|
-
ow_1.default(value, 'string choice value', stringPredicate);
|
|
36
|
-
else
|
|
37
|
-
ow_1.default(value, `${ApplicationCommandOptionTypeNames[this.type]} choice value`, integerPredicate);
|
|
38
|
-
this.choices.push({ name, value });
|
|
39
|
-
return this;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Adds multiple choices for this option
|
|
43
|
-
* @param choices The choices to add
|
|
44
|
-
*/
|
|
45
|
-
addChoices(choices) {
|
|
46
|
-
ow_1.default(choices, `${ApplicationCommandOptionTypeNames[this.type]} choices`, choicesPredicate);
|
|
47
|
-
for (const [label, value] of choices)
|
|
48
|
-
this.addChoice(label, value);
|
|
49
|
-
return this;
|
|
50
|
-
}
|
|
51
|
-
toJSON() {
|
|
52
|
-
return {
|
|
53
|
-
...super.toJSON(),
|
|
54
|
-
choices: this.choices,
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
exports.ApplicationCommandOptionWithChoicesBase = ApplicationCommandOptionWithChoicesBase;
|
|
59
|
-
const ApplicationCommandOptionTypeNames = {
|
|
60
|
-
[1 /* Subcommand */]: 'subcommand',
|
|
61
|
-
[2 /* SubcommandGroup */]: 'subcommand group',
|
|
62
|
-
[3 /* String */]: 'string',
|
|
63
|
-
[4 /* Integer */]: 'integer',
|
|
64
|
-
[5 /* Boolean */]: 'boolean',
|
|
65
|
-
[6 /* User */]: 'user',
|
|
66
|
-
[7 /* Channel */]: 'channel',
|
|
67
|
-
[8 /* Role */]: 'role',
|
|
68
|
-
[9 /* Mentionable */]: 'mentionable',
|
|
69
|
-
[10 /* Number */]: 'number',
|
|
70
|
-
};
|
|
71
|
-
//# sourceMappingURL=CommandOptionWithChoices.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommandOptionWithChoices.js","sourceRoot":"/","sources":["interactions/slashCommands/mixins/CommandOptionWithChoices.ts"],"names":[],"mappings":";;;;AAAA,gCAAuG;AACvG,oDAAmC;AACnC,8CAAyD;AAEzD,2DAA6D;AAE7D,MAAM,eAAe,GAAG,YAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;AAC9D,MAAM,gBAAgB,GAAG,YAAE,CAAC,MAAM,CAAC,MAAM,CAAC;AAE1C,wEAAwE;AACxE,MAAM,gBAAgB,GAAG,YAAE,CAAC,KAAK,CAAC,MAAM,CACvC,YAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,eAAe,EAAE,YAAE,CAAC,GAAG,CAAC,YAAE,CAAC,MAAM,EAAE,gBAAgB,CAA0C,CAAC,CAAC,CACpH,CAAC;AAEF,MAAsB,uCACrB,SAAQ,0CAAsB;IAD/B;;QAIC;;;;;WAAqD;IAyCtD,CAAC;IAvCA;;;;OAIG;IACI,SAAS,CAAC,IAAY,EAAE,KAAQ;QACtC,IAAI,CAAC,OAAO,KAAZ,IAAI,CAAC,OAAO,GAAK,EAAE,EAAC;QAEpB,qCAAwB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAEvC,gBAAgB;QAChB,YAAE,CAAC,IAAI,EAAE,GAAG,iCAAiC,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;QAEzF,qBAAqB;QACrB,IAAI,IAAI,CAAC,IAAI,mBAAwC;YAAE,YAAE,CAAC,KAAK,EAAE,qBAAqB,EAAE,eAAe,CAAC,CAAC;;YACpG,YAAE,CAAC,KAAK,EAAE,GAAG,iCAAiC,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;QAEjG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;QAEnC,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;;OAGG;IACI,UAAU,CAAC,OAAmC;QACpD,YAAE,CAAC,OAAO,EAAE,GAAG,iCAAiC,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;QAEzF,KAAK,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,OAAO;YAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACnE,OAAO,IAAI,CAAC;IACb,CAAC;IAEe,MAAM;QACrB,OAAO;YACN,GAAG,KAAK,CAAC,MAAM,EAAE;YACjB,OAAO,EAAE,IAAI,CAAC,OAAO;SACrB,CAAC;IACH,CAAC;CACD;AA7CD,0FA6CC;AAED,MAAM,iCAAiC,GAAG;IACzC,oBAAyC,EAAE,YAAY;IACvD,yBAA8C,EAAE,kBAAkB;IAClE,gBAAqC,EAAE,QAAQ;IAC/C,iBAAsC,EAAE,SAAS;IACjD,iBAAsC,EAAE,SAAS;IACjD,cAAmC,EAAE,MAAM;IAC3C,iBAAsC,EAAE,SAAS;IACjD,cAAmC,EAAE,MAAM;IAC3C,qBAA0C,EAAE,aAAa;IACzD,iBAAqC,EAAE,QAAQ;CACtC,CAAC","sourcesContent":["import { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport ow, { Predicate } from 'ow';\nimport { validateMaxChoicesLength } from '../Assertions';\nimport type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder';\nimport { SlashCommandOptionBase } from './CommandOptionBase';\n\nconst stringPredicate = ow.string.minLength(1).maxLength(100);\nconst integerPredicate = ow.number.finite;\n\n// TODO: See resolution for sindresorhus/ow#217 in relation to this cast\nconst choicesPredicate = ow.array.ofType<[string, string | number]>(\n\tow.array.exactShape([stringPredicate, ow.any(ow.string, integerPredicate) as unknown as Predicate<string | number>]),\n);\n\nexport abstract class ApplicationCommandOptionWithChoicesBase<T extends string | number>\n\textends SlashCommandOptionBase\n\timplements ToAPIApplicationCommandOptions\n{\n\tpublic choices?: APIApplicationCommandOptionChoice[];\n\n\t/**\n\t * Adds a choice for this option\n\t * @param name The name of the choice\n\t * @param value The value of the choice\n\t */\n\tpublic addChoice(name: string, value: T) {\n\t\tthis.choices ??= [];\n\n\t\tvalidateMaxChoicesLength(this.choices);\n\n\t\t// Validate name\n\t\tow(name, `${ApplicationCommandOptionTypeNames[this.type]} choice name`, stringPredicate);\n\n\t\t// Validate the value\n\t\tif (this.type === ApplicationCommandOptionType.String) ow(value, 'string choice value', stringPredicate);\n\t\telse ow(value, `${ApplicationCommandOptionTypeNames[this.type]} choice value`, integerPredicate);\n\n\t\tthis.choices.push({ name, value });\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds multiple choices for this option\n\t * @param choices The choices to add\n\t */\n\tpublic addChoices(choices: [name: string, value: T][]) {\n\t\tow(choices, `${ApplicationCommandOptionTypeNames[this.type]} choices`, choicesPredicate);\n\n\t\tfor (const [label, value] of choices) this.addChoice(label, value);\n\t\treturn this;\n\t}\n\n\tpublic override toJSON() {\n\t\treturn {\n\t\t\t...super.toJSON(),\n\t\t\tchoices: this.choices,\n\t\t};\n\t}\n}\n\nconst ApplicationCommandOptionTypeNames = {\n\t[ApplicationCommandOptionType.Subcommand]: 'subcommand',\n\t[ApplicationCommandOptionType.SubcommandGroup]: 'subcommand group',\n\t[ApplicationCommandOptionType.String]: 'string',\n\t[ApplicationCommandOptionType.Integer]: 'integer',\n\t[ApplicationCommandOptionType.Boolean]: 'boolean',\n\t[ApplicationCommandOptionType.User]: 'user',\n\t[ApplicationCommandOptionType.Channel]: 'channel',\n\t[ApplicationCommandOptionType.Role]: 'role',\n\t[ApplicationCommandOptionType.Mentionable]: 'mentionable',\n\t[ApplicationCommandOptionType.Number]: 'number',\n} as const;\n"]}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { SlashCommandBooleanOption } from '../options/boolean';
|
|
2
|
-
import { SlashCommandChannelOption } from '../options/channel';
|
|
3
|
-
import { SlashCommandIntegerOption } from '../options/integer';
|
|
4
|
-
import { SlashCommandMentionableOption } from '../options/mentionable';
|
|
5
|
-
import { SlashCommandNumberOption } from '../options/number';
|
|
6
|
-
import { SlashCommandRoleOption } from '../options/role';
|
|
7
|
-
import { SlashCommandStringOption } from '../options/string';
|
|
8
|
-
import { SlashCommandUserOption } from '../options/user';
|
|
9
|
-
import type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder';
|
|
10
|
-
export declare class SharedSlashCommandOptions<ShouldOmitSubcommandFunctions = true> {
|
|
11
|
-
readonly options: ToAPIApplicationCommandOptions[];
|
|
12
|
-
/**
|
|
13
|
-
* Adds a boolean option
|
|
14
|
-
* @param input A function that returns an option builder, or an already built builder
|
|
15
|
-
*/
|
|
16
|
-
addBooleanOption(input: SlashCommandBooleanOption | ((builder: SlashCommandBooleanOption) => SlashCommandBooleanOption)): ShouldOmitSubcommandFunctions extends true ? Omit<this, "addSubcommand" | "addSubcommandGroup"> : this;
|
|
17
|
-
/**
|
|
18
|
-
* Adds a user option
|
|
19
|
-
* @param input A function that returns an option builder, or an already built builder
|
|
20
|
-
*/
|
|
21
|
-
addUserOption(input: SlashCommandUserOption | ((builder: SlashCommandUserOption) => SlashCommandUserOption)): ShouldOmitSubcommandFunctions extends true ? Omit<this, "addSubcommand" | "addSubcommandGroup"> : this;
|
|
22
|
-
/**
|
|
23
|
-
* Adds a channel option
|
|
24
|
-
* @param input A function that returns an option builder, or an already built builder
|
|
25
|
-
*/
|
|
26
|
-
addChannelOption(input: SlashCommandChannelOption | ((builder: SlashCommandChannelOption) => SlashCommandChannelOption)): ShouldOmitSubcommandFunctions extends true ? Omit<this, "addSubcommand" | "addSubcommandGroup"> : this;
|
|
27
|
-
/**
|
|
28
|
-
* Adds a role option
|
|
29
|
-
* @param input A function that returns an option builder, or an already built builder
|
|
30
|
-
*/
|
|
31
|
-
addRoleOption(input: SlashCommandRoleOption | ((builder: SlashCommandRoleOption) => SlashCommandRoleOption)): ShouldOmitSubcommandFunctions extends true ? Omit<this, "addSubcommand" | "addSubcommandGroup"> : this;
|
|
32
|
-
/**
|
|
33
|
-
* Adds a mentionable option
|
|
34
|
-
* @param input A function that returns an option builder, or an already built builder
|
|
35
|
-
*/
|
|
36
|
-
addMentionableOption(input: SlashCommandMentionableOption | ((builder: SlashCommandMentionableOption) => SlashCommandMentionableOption)): ShouldOmitSubcommandFunctions extends true ? Omit<this, "addSubcommand" | "addSubcommandGroup"> : this;
|
|
37
|
-
/**
|
|
38
|
-
* Adds a string option
|
|
39
|
-
* @param input A function that returns an option builder, or an already built builder
|
|
40
|
-
*/
|
|
41
|
-
addStringOption(input: SlashCommandStringOption | ((builder: SlashCommandStringOption) => SlashCommandStringOption)): ShouldOmitSubcommandFunctions extends true ? Omit<this, "addSubcommand" | "addSubcommandGroup"> : this;
|
|
42
|
-
/**
|
|
43
|
-
* Adds an integer option
|
|
44
|
-
* @param input A function that returns an option builder, or an already built builder
|
|
45
|
-
*/
|
|
46
|
-
addIntegerOption(input: SlashCommandIntegerOption | ((builder: SlashCommandIntegerOption) => SlashCommandIntegerOption)): ShouldOmitSubcommandFunctions extends true ? Omit<this, "addSubcommand" | "addSubcommandGroup"> : this;
|
|
47
|
-
/**
|
|
48
|
-
* Adds a number option
|
|
49
|
-
* @param input A function that returns an option builder, or an already built builder
|
|
50
|
-
*/
|
|
51
|
-
addNumberOption(input: SlashCommandNumberOption | ((builder: SlashCommandNumberOption) => SlashCommandNumberOption)): ShouldOmitSubcommandFunctions extends true ? Omit<this, "addSubcommand" | "addSubcommandGroup"> : this;
|
|
52
|
-
private _sharedAddOptionMethod;
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=CommandOptions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommandOptions.d.ts","sourceRoot":"/","sources":["interactions/slashCommands/mixins/CommandOptions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AAE7E,qBAAa,yBAAyB,CAAC,6BAA6B,GAAG,IAAI;IAC1E,SAAgB,OAAO,EAAG,8BAA8B,EAAE,CAAC;IAE3D;;;OAGG;IACI,gBAAgB,CACtB,KAAK,EAAE,yBAAyB,GAAG,CAAC,CAAC,OAAO,EAAE,yBAAyB,KAAK,yBAAyB,CAAC;IAKvG;;;OAGG;IACI,aAAa,CAAC,KAAK,EAAE,sBAAsB,GAAG,CAAC,CAAC,OAAO,EAAE,sBAAsB,KAAK,sBAAsB,CAAC;IAIlH;;;OAGG;IACI,gBAAgB,CACtB,KAAK,EAAE,yBAAyB,GAAG,CAAC,CAAC,OAAO,EAAE,yBAAyB,KAAK,yBAAyB,CAAC;IAKvG;;;OAGG;IACI,aAAa,CAAC,KAAK,EAAE,sBAAsB,GAAG,CAAC,CAAC,OAAO,EAAE,sBAAsB,KAAK,sBAAsB,CAAC;IAIlH;;;OAGG;IACI,oBAAoB,CAC1B,KAAK,EAAE,6BAA6B,GAAG,CAAC,CAAC,OAAO,EAAE,6BAA6B,KAAK,6BAA6B,CAAC;IAKnH;;;OAGG;IACI,eAAe,CACrB,KAAK,EAAE,wBAAwB,GAAG,CAAC,CAAC,OAAO,EAAE,wBAAwB,KAAK,wBAAwB,CAAC;IAKpG;;;OAGG;IACI,gBAAgB,CACtB,KAAK,EAAE,yBAAyB,GAAG,CAAC,CAAC,OAAO,EAAE,yBAAyB,KAAK,yBAAyB,CAAC;IAKvG;;;OAGG;IACI,eAAe,CACrB,KAAK,EAAE,wBAAwB,GAAG,CAAC,CAAC,OAAO,EAAE,wBAAwB,KAAK,wBAAwB,CAAC;IAKpG,OAAO,CAAC,sBAAsB;CAmB9B"}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SharedSlashCommandOptions = void 0;
|
|
4
|
-
const Assertions_1 = require("../Assertions");
|
|
5
|
-
const boolean_1 = require("../options/boolean");
|
|
6
|
-
const channel_1 = require("../options/channel");
|
|
7
|
-
const integer_1 = require("../options/integer");
|
|
8
|
-
const mentionable_1 = require("../options/mentionable");
|
|
9
|
-
const number_1 = require("../options/number");
|
|
10
|
-
const role_1 = require("../options/role");
|
|
11
|
-
const string_1 = require("../options/string");
|
|
12
|
-
const user_1 = require("../options/user");
|
|
13
|
-
class SharedSlashCommandOptions {
|
|
14
|
-
constructor() {
|
|
15
|
-
Object.defineProperty(this, "options", {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
configurable: true,
|
|
18
|
-
writable: true,
|
|
19
|
-
value: void 0
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Adds a boolean option
|
|
24
|
-
* @param input A function that returns an option builder, or an already built builder
|
|
25
|
-
*/
|
|
26
|
-
addBooleanOption(input) {
|
|
27
|
-
return this._sharedAddOptionMethod(input, boolean_1.SlashCommandBooleanOption);
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Adds a user option
|
|
31
|
-
* @param input A function that returns an option builder, or an already built builder
|
|
32
|
-
*/
|
|
33
|
-
addUserOption(input) {
|
|
34
|
-
return this._sharedAddOptionMethod(input, user_1.SlashCommandUserOption);
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Adds a channel option
|
|
38
|
-
* @param input A function that returns an option builder, or an already built builder
|
|
39
|
-
*/
|
|
40
|
-
addChannelOption(input) {
|
|
41
|
-
return this._sharedAddOptionMethod(input, channel_1.SlashCommandChannelOption);
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Adds a role option
|
|
45
|
-
* @param input A function that returns an option builder, or an already built builder
|
|
46
|
-
*/
|
|
47
|
-
addRoleOption(input) {
|
|
48
|
-
return this._sharedAddOptionMethod(input, role_1.SlashCommandRoleOption);
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Adds a mentionable option
|
|
52
|
-
* @param input A function that returns an option builder, or an already built builder
|
|
53
|
-
*/
|
|
54
|
-
addMentionableOption(input) {
|
|
55
|
-
return this._sharedAddOptionMethod(input, mentionable_1.SlashCommandMentionableOption);
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Adds a string option
|
|
59
|
-
* @param input A function that returns an option builder, or an already built builder
|
|
60
|
-
*/
|
|
61
|
-
addStringOption(input) {
|
|
62
|
-
return this._sharedAddOptionMethod(input, string_1.SlashCommandStringOption);
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Adds an integer option
|
|
66
|
-
* @param input A function that returns an option builder, or an already built builder
|
|
67
|
-
*/
|
|
68
|
-
addIntegerOption(input) {
|
|
69
|
-
return this._sharedAddOptionMethod(input, integer_1.SlashCommandIntegerOption);
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Adds a number option
|
|
73
|
-
* @param input A function that returns an option builder, or an already built builder
|
|
74
|
-
*/
|
|
75
|
-
addNumberOption(input) {
|
|
76
|
-
return this._sharedAddOptionMethod(input, number_1.SlashCommandNumberOption);
|
|
77
|
-
}
|
|
78
|
-
_sharedAddOptionMethod(input, Instance) {
|
|
79
|
-
const { options } = this;
|
|
80
|
-
// First, assert options conditions - we cannot have more than 25 options
|
|
81
|
-
Assertions_1.validateMaxOptionsLength(options);
|
|
82
|
-
// Get the final result
|
|
83
|
-
const result = typeof input === 'function' ? input(new Instance()) : input;
|
|
84
|
-
Assertions_1.assertReturnOfBuilder(result, Instance);
|
|
85
|
-
// Push it
|
|
86
|
-
options.push(result);
|
|
87
|
-
return this;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
exports.SharedSlashCommandOptions = SharedSlashCommandOptions;
|
|
91
|
-
//# sourceMappingURL=CommandOptions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommandOptions.js","sourceRoot":"/","sources":["interactions/slashCommands/mixins/CommandOptions.ts"],"names":[],"mappings":";;;AAAA,8CAAgF;AAEhF,gDAA+D;AAC/D,gDAA+D;AAC/D,gDAA+D;AAC/D,wDAAuE;AACvE,8CAA6D;AAC7D,0CAAyD;AACzD,8CAA6D;AAC7D,0CAAyD;AAGzD,MAAa,yBAAyB;IAAtC;QACC;;;;;WAA2D;IAiG5D,CAAC;IA/FA;;;OAGG;IACI,gBAAgB,CACtB,KAAsG;QAEtG,OAAO,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,mCAAyB,CAAC,CAAC;IACtE,CAAC;IAED;;;OAGG;IACI,aAAa,CAAC,KAA6F;QACjH,OAAO,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,6BAAsB,CAAC,CAAC;IACnE,CAAC;IAED;;;OAGG;IACI,gBAAgB,CACtB,KAAsG;QAEtG,OAAO,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,mCAAyB,CAAC,CAAC;IACtE,CAAC;IAED;;;OAGG;IACI,aAAa,CAAC,KAA6F;QACjH,OAAO,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,6BAAsB,CAAC,CAAC;IACnE,CAAC;IAED;;;OAGG;IACI,oBAAoB,CAC1B,KAAkH;QAElH,OAAO,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,2CAA6B,CAAC,CAAC;IAC1E,CAAC;IAED;;;OAGG;IACI,eAAe,CACrB,KAAmG;QAEnG,OAAO,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,iCAAwB,CAAC,CAAC;IACrE,CAAC;IAED;;;OAGG;IACI,gBAAgB,CACtB,KAAsG;QAEtG,OAAO,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,mCAAyB,CAAC,CAAC;IACtE,CAAC;IAED;;;OAGG;IACI,eAAe,CACrB,KAAmG;QAEnG,OAAO,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,iCAAwB,CAAC,CAAC;IACrE,CAAC;IAEO,sBAAsB,CAC7B,KAA8B,EAC9B,QAAqB;QAErB,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;QAEzB,yEAAyE;QACzE,qCAAwB,CAAC,OAAO,CAAC,CAAC;QAElC,uBAAuB;QACvB,MAAM,MAAM,GAAG,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QAE3E,kCAAqB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAExC,UAAU;QACV,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAErB,OAAO,IAAI,CAAC;IACb,CAAC;CACD;AAlGD,8DAkGC","sourcesContent":["import { assertReturnOfBuilder, validateMaxOptionsLength } from '../Assertions';\nimport type { SlashCommandOptionBase } from './CommandOptionBase';\nimport { SlashCommandBooleanOption } from '../options/boolean';\nimport { SlashCommandChannelOption } from '../options/channel';\nimport { SlashCommandIntegerOption } from '../options/integer';\nimport { SlashCommandMentionableOption } from '../options/mentionable';\nimport { SlashCommandNumberOption } from '../options/number';\nimport { SlashCommandRoleOption } from '../options/role';\nimport { SlashCommandStringOption } from '../options/string';\nimport { SlashCommandUserOption } from '../options/user';\nimport type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder';\n\nexport class SharedSlashCommandOptions<ShouldOmitSubcommandFunctions = true> {\n\tpublic readonly options!: ToAPIApplicationCommandOptions[];\n\n\t/**\n\t * Adds a boolean option\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addBooleanOption(\n\t\tinput: SlashCommandBooleanOption | ((builder: SlashCommandBooleanOption) => SlashCommandBooleanOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandBooleanOption);\n\t}\n\n\t/**\n\t * Adds a user option\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addUserOption(input: SlashCommandUserOption | ((builder: SlashCommandUserOption) => SlashCommandUserOption)) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandUserOption);\n\t}\n\n\t/**\n\t * Adds a channel option\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addChannelOption(\n\t\tinput: SlashCommandChannelOption | ((builder: SlashCommandChannelOption) => SlashCommandChannelOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandChannelOption);\n\t}\n\n\t/**\n\t * Adds a role option\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addRoleOption(input: SlashCommandRoleOption | ((builder: SlashCommandRoleOption) => SlashCommandRoleOption)) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandRoleOption);\n\t}\n\n\t/**\n\t * Adds a mentionable option\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addMentionableOption(\n\t\tinput: SlashCommandMentionableOption | ((builder: SlashCommandMentionableOption) => SlashCommandMentionableOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandMentionableOption);\n\t}\n\n\t/**\n\t * Adds a string option\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addStringOption(\n\t\tinput: SlashCommandStringOption | ((builder: SlashCommandStringOption) => SlashCommandStringOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandStringOption);\n\t}\n\n\t/**\n\t * Adds an integer option\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addIntegerOption(\n\t\tinput: SlashCommandIntegerOption | ((builder: SlashCommandIntegerOption) => SlashCommandIntegerOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandIntegerOption);\n\t}\n\n\t/**\n\t * Adds a number option\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addNumberOption(\n\t\tinput: SlashCommandNumberOption | ((builder: SlashCommandNumberOption) => SlashCommandNumberOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandNumberOption);\n\t}\n\n\tprivate _sharedAddOptionMethod<T extends SlashCommandOptionBase>(\n\t\tinput: T | ((builder: T) => T),\n\t\tInstance: new () => T,\n\t): ShouldOmitSubcommandFunctions extends true ? Omit<this, 'addSubcommand' | 'addSubcommandGroup'> : this {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new Instance()) : input;\n\n\t\tassertReturnOfBuilder(result, Instance);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n}\n"]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare class SharedNameAndDescription {
|
|
2
|
-
readonly name: string;
|
|
3
|
-
readonly description: string;
|
|
4
|
-
/**
|
|
5
|
-
* Sets the name
|
|
6
|
-
* @param name The name
|
|
7
|
-
*/
|
|
8
|
-
setName(name: string): this;
|
|
9
|
-
/**
|
|
10
|
-
* Sets the description
|
|
11
|
-
* @param description The description
|
|
12
|
-
*/
|
|
13
|
-
setDescription(description: string): this;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=NameAndDescription.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NameAndDescription.d.ts","sourceRoot":"/","sources":["interactions/slashCommands/mixins/NameAndDescription.ts"],"names":[],"mappings":"AAEA,qBAAa,wBAAwB;IACpC,SAAgB,IAAI,EAAG,MAAM,CAAC;IAC9B,SAAgB,WAAW,EAAG,MAAM,CAAC;IAErC;;;OAGG;IACI,OAAO,CAAC,IAAI,EAAE,MAAM;IAS3B;;;OAGG;IACI,cAAc,CAAC,WAAW,EAAE,MAAM;CAQzC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SharedNameAndDescription = void 0;
|
|
4
|
-
const Assertions_1 = require("../Assertions");
|
|
5
|
-
class SharedNameAndDescription {
|
|
6
|
-
constructor() {
|
|
7
|
-
Object.defineProperty(this, "name", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
configurable: true,
|
|
10
|
-
writable: true,
|
|
11
|
-
value: void 0
|
|
12
|
-
});
|
|
13
|
-
Object.defineProperty(this, "description", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
configurable: true,
|
|
16
|
-
writable: true,
|
|
17
|
-
value: void 0
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Sets the name
|
|
22
|
-
* @param name The name
|
|
23
|
-
*/
|
|
24
|
-
setName(name) {
|
|
25
|
-
// Assert the name matches the conditions
|
|
26
|
-
Assertions_1.validateName(name);
|
|
27
|
-
Reflect.set(this, 'name', name);
|
|
28
|
-
return this;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Sets the description
|
|
32
|
-
* @param description The description
|
|
33
|
-
*/
|
|
34
|
-
setDescription(description) {
|
|
35
|
-
// Assert the description matches the conditions
|
|
36
|
-
Assertions_1.validateDescription(description);
|
|
37
|
-
Reflect.set(this, 'description', description);
|
|
38
|
-
return this;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
exports.SharedNameAndDescription = SharedNameAndDescription;
|
|
42
|
-
//# sourceMappingURL=NameAndDescription.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NameAndDescription.js","sourceRoot":"/","sources":["interactions/slashCommands/mixins/NameAndDescription.ts"],"names":[],"mappings":";;;AAAA,8CAAkE;AAElE,MAAa,wBAAwB;IAArC;QACC;;;;;WAA8B;QAC9B;;;;;WAAqC;IA2BtC,CAAC;IAzBA;;;OAGG;IACI,OAAO,CAAC,IAAY;QAC1B,yCAAyC;QACzC,yBAAY,CAAC,IAAI,CAAC,CAAC;QAEnB,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;QAEhC,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;;OAGG;IACI,cAAc,CAAC,WAAmB;QACxC,gDAAgD;QAChD,gCAAmB,CAAC,WAAW,CAAC,CAAC;QAEjC,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC;QAE9C,OAAO,IAAI,CAAC;IACb,CAAC;CACD;AA7BD,4DA6BC","sourcesContent":["import { validateDescription, validateName } from '../Assertions';\n\nexport class SharedNameAndDescription {\n\tpublic readonly name!: string;\n\tpublic readonly description!: string;\n\n\t/**\n\t * Sets the name\n\t * @param name The name\n\t */\n\tpublic setName(name: string) {\n\t\t// Assert the name matches the conditions\n\t\tvalidateName(name);\n\n\t\tReflect.set(this, 'name', name);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description\n\t * @param description The description\n\t */\n\tpublic setDescription(description: string) {\n\t\t// Assert the description matches the conditions\n\t\tvalidateDescription(description);\n\n\t\tReflect.set(this, 'description', description);\n\n\t\treturn this;\n\t}\n}\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ApplicationCommandOptionType } from 'discord-api-types/v9';
|
|
2
|
-
import { SlashCommandOptionBase } from '../mixins/CommandOptionBase';
|
|
3
|
-
export declare class SlashCommandBooleanOption extends SlashCommandOptionBase {
|
|
4
|
-
readonly type: ApplicationCommandOptionType.Boolean;
|
|
5
|
-
constructor();
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=boolean.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"boolean.d.ts","sourceRoot":"/","sources":["interactions/slashCommands/options/boolean.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,qBAAa,yBAA0B,SAAQ,sBAAsB;IACpE,SAAyB,IAAI,uCAAiD;;CAK9E"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SlashCommandBooleanOption = void 0;
|
|
4
|
-
require("discord-api-types/v9");
|
|
5
|
-
const CommandOptionBase_1 = require("../mixins/CommandOptionBase");
|
|
6
|
-
class SlashCommandBooleanOption extends CommandOptionBase_1.SlashCommandOptionBase {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(5 /* Boolean */);
|
|
9
|
-
Object.defineProperty(this, "type", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
configurable: true,
|
|
12
|
-
writable: true,
|
|
13
|
-
value: 5 /* Boolean */
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.SlashCommandBooleanOption = SlashCommandBooleanOption;
|
|
18
|
-
//# sourceMappingURL=boolean.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"boolean.js","sourceRoot":"/","sources":["interactions/slashCommands/options/boolean.ts"],"names":[],"mappings":";;;AAAA,gCAAoE;AACpE,mEAAqE;AAErE,MAAa,yBAA0B,SAAQ,0CAAsB;IAGpE;QACC,KAAK,iBAAsC,CAAC;QAH7C;;;;mBAAgC,eAA6C;WAAC;IAI9E,CAAC;CACD;AAND,8DAMC","sourcesContent":["import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { SlashCommandOptionBase } from '../mixins/CommandOptionBase';\n\nexport class SlashCommandBooleanOption extends SlashCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Boolean as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.Boolean);\n\t}\n}\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ApplicationCommandOptionType } from 'discord-api-types/v9';
|
|
2
|
-
import { SlashCommandOptionBase } from '../mixins/CommandOptionBase';
|
|
3
|
-
export declare class SlashCommandChannelOption extends SlashCommandOptionBase {
|
|
4
|
-
readonly type: ApplicationCommandOptionType.Channel;
|
|
5
|
-
constructor();
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=channel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"channel.d.ts","sourceRoot":"/","sources":["interactions/slashCommands/options/channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,qBAAa,yBAA0B,SAAQ,sBAAsB;IACpE,SAAyB,IAAI,uCAAiD;;CAK9E"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SlashCommandChannelOption = void 0;
|
|
4
|
-
require("discord-api-types/v9");
|
|
5
|
-
const CommandOptionBase_1 = require("../mixins/CommandOptionBase");
|
|
6
|
-
class SlashCommandChannelOption extends CommandOptionBase_1.SlashCommandOptionBase {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(7 /* Channel */);
|
|
9
|
-
Object.defineProperty(this, "type", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
configurable: true,
|
|
12
|
-
writable: true,
|
|
13
|
-
value: 7 /* Channel */
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.SlashCommandChannelOption = SlashCommandChannelOption;
|
|
18
|
-
//# sourceMappingURL=channel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"channel.js","sourceRoot":"/","sources":["interactions/slashCommands/options/channel.ts"],"names":[],"mappings":";;;AAAA,gCAAoE;AACpE,mEAAqE;AAErE,MAAa,yBAA0B,SAAQ,0CAAsB;IAGpE;QACC,KAAK,iBAAsC,CAAC;QAH7C;;;;mBAAgC,eAA6C;WAAC;IAI9E,CAAC;CACD;AAND,8DAMC","sourcesContent":["import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { SlashCommandOptionBase } from '../mixins/CommandOptionBase';\n\nexport class SlashCommandChannelOption extends SlashCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Channel as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.Channel);\n\t}\n}\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ApplicationCommandOptionType } from 'discord-api-types/v9';
|
|
2
|
-
import { ApplicationCommandOptionWithChoicesBase } from '../mixins/CommandOptionWithChoices';
|
|
3
|
-
export declare class SlashCommandIntegerOption extends ApplicationCommandOptionWithChoicesBase<number> {
|
|
4
|
-
readonly type: ApplicationCommandOptionType.Integer;
|
|
5
|
-
constructor();
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=integer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integer.d.ts","sourceRoot":"/","sources":["interactions/slashCommands/options/integer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,uCAAuC,EAAE,MAAM,oCAAoC,CAAC;AAE7F,qBAAa,yBAA0B,SAAQ,uCAAuC,CAAC,MAAM,CAAC;IAC7F,SAAyB,IAAI,uCAAiD;;CAK9E"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SlashCommandIntegerOption = void 0;
|
|
4
|
-
require("discord-api-types/v9");
|
|
5
|
-
const CommandOptionWithChoices_1 = require("../mixins/CommandOptionWithChoices");
|
|
6
|
-
class SlashCommandIntegerOption extends CommandOptionWithChoices_1.ApplicationCommandOptionWithChoicesBase {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(4 /* Integer */);
|
|
9
|
-
Object.defineProperty(this, "type", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
configurable: true,
|
|
12
|
-
writable: true,
|
|
13
|
-
value: 4 /* Integer */
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.SlashCommandIntegerOption = SlashCommandIntegerOption;
|
|
18
|
-
//# sourceMappingURL=integer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integer.js","sourceRoot":"/","sources":["interactions/slashCommands/options/integer.ts"],"names":[],"mappings":";;;AAAA,gCAAoE;AACpE,iFAA6F;AAE7F,MAAa,yBAA0B,SAAQ,kEAA+C;IAG7F;QACC,KAAK,iBAAsC,CAAC;QAH7C;;;;mBAAgC,eAA6C;WAAC;IAI9E,CAAC;CACD;AAND,8DAMC","sourcesContent":["import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { ApplicationCommandOptionWithChoicesBase } from '../mixins/CommandOptionWithChoices';\n\nexport class SlashCommandIntegerOption extends ApplicationCommandOptionWithChoicesBase<number> {\n\tpublic override readonly type = ApplicationCommandOptionType.Integer as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.Integer);\n\t}\n}\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ApplicationCommandOptionType } from 'discord-api-types/v9';
|
|
2
|
-
import { SlashCommandOptionBase } from '../mixins/CommandOptionBase';
|
|
3
|
-
export declare class SlashCommandMentionableOption extends SlashCommandOptionBase {
|
|
4
|
-
readonly type: ApplicationCommandOptionType.Mentionable;
|
|
5
|
-
constructor();
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=mentionable.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mentionable.d.ts","sourceRoot":"/","sources":["interactions/slashCommands/options/mentionable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,qBAAa,6BAA8B,SAAQ,sBAAsB;IACxE,SAAyB,IAAI,2CAAqD;;CAKlF"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SlashCommandMentionableOption = void 0;
|
|
4
|
-
require("discord-api-types/v9");
|
|
5
|
-
const CommandOptionBase_1 = require("../mixins/CommandOptionBase");
|
|
6
|
-
class SlashCommandMentionableOption extends CommandOptionBase_1.SlashCommandOptionBase {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(9 /* Mentionable */);
|
|
9
|
-
Object.defineProperty(this, "type", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
configurable: true,
|
|
12
|
-
writable: true,
|
|
13
|
-
value: 9 /* Mentionable */
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.SlashCommandMentionableOption = SlashCommandMentionableOption;
|
|
18
|
-
//# sourceMappingURL=mentionable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mentionable.js","sourceRoot":"/","sources":["interactions/slashCommands/options/mentionable.ts"],"names":[],"mappings":";;;AAAA,gCAAoE;AACpE,mEAAqE;AAErE,MAAa,6BAA8B,SAAQ,0CAAsB;IAGxE;QACC,KAAK,qBAA0C,CAAC;QAHjD;;;;mBAAgC,mBAAiD;WAAC;IAIlF,CAAC;CACD;AAND,sEAMC","sourcesContent":["import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { SlashCommandOptionBase } from '../mixins/CommandOptionBase';\n\nexport class SlashCommandMentionableOption extends SlashCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Mentionable as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.Mentionable);\n\t}\n}\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ApplicationCommandOptionType } from 'discord-api-types/v9';
|
|
2
|
-
import { ApplicationCommandOptionWithChoicesBase } from '../mixins/CommandOptionWithChoices';
|
|
3
|
-
export declare class SlashCommandNumberOption extends ApplicationCommandOptionWithChoicesBase<number> {
|
|
4
|
-
readonly type: ApplicationCommandOptionType.Number;
|
|
5
|
-
constructor();
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=number.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"number.d.ts","sourceRoot":"/","sources":["interactions/slashCommands/options/number.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,uCAAuC,EAAE,MAAM,oCAAoC,CAAC;AAE7F,qBAAa,wBAAyB,SAAQ,uCAAuC,CAAC,MAAM,CAAC;IAC5F,SAAyB,IAAI,sCAAgD;;CAK7E"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SlashCommandNumberOption = void 0;
|
|
4
|
-
require("discord-api-types/v9");
|
|
5
|
-
const CommandOptionWithChoices_1 = require("../mixins/CommandOptionWithChoices");
|
|
6
|
-
class SlashCommandNumberOption extends CommandOptionWithChoices_1.ApplicationCommandOptionWithChoicesBase {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(10 /* Number */);
|
|
9
|
-
Object.defineProperty(this, "type", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
configurable: true,
|
|
12
|
-
writable: true,
|
|
13
|
-
value: 10 /* Number */
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.SlashCommandNumberOption = SlashCommandNumberOption;
|
|
18
|
-
//# sourceMappingURL=number.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"number.js","sourceRoot":"/","sources":["interactions/slashCommands/options/number.ts"],"names":[],"mappings":";;;AAAA,gCAAoE;AACpE,iFAA6F;AAE7F,MAAa,wBAAyB,SAAQ,kEAA+C;IAG5F;QACC,KAAK,iBAAqC,CAAC;QAH5C;;;;mBAAgC,eAA4C;WAAC;IAI7E,CAAC;CACD;AAND,4DAMC","sourcesContent":["import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { ApplicationCommandOptionWithChoicesBase } from '../mixins/CommandOptionWithChoices';\n\nexport class SlashCommandNumberOption extends ApplicationCommandOptionWithChoicesBase<number> {\n\tpublic override readonly type = ApplicationCommandOptionType.Number as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.Number);\n\t}\n}\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ApplicationCommandOptionType } from 'discord-api-types/v9';
|
|
2
|
-
import { SlashCommandOptionBase } from '../mixins/CommandOptionBase';
|
|
3
|
-
export declare class SlashCommandRoleOption extends SlashCommandOptionBase {
|
|
4
|
-
readonly type: ApplicationCommandOptionType.Role;
|
|
5
|
-
constructor();
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=role.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"role.d.ts","sourceRoot":"/","sources":["interactions/slashCommands/options/role.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,qBAAa,sBAAuB,SAAQ,sBAAsB;IACjE,SAAyB,IAAI,oCAA8C;;CAK3E"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SlashCommandRoleOption = void 0;
|
|
4
|
-
require("discord-api-types/v9");
|
|
5
|
-
const CommandOptionBase_1 = require("../mixins/CommandOptionBase");
|
|
6
|
-
class SlashCommandRoleOption extends CommandOptionBase_1.SlashCommandOptionBase {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(8 /* Role */);
|
|
9
|
-
Object.defineProperty(this, "type", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
configurable: true,
|
|
12
|
-
writable: true,
|
|
13
|
-
value: 8 /* Role */
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.SlashCommandRoleOption = SlashCommandRoleOption;
|
|
18
|
-
//# sourceMappingURL=role.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"role.js","sourceRoot":"/","sources":["interactions/slashCommands/options/role.ts"],"names":[],"mappings":";;;AAAA,gCAAoE;AACpE,mEAAqE;AAErE,MAAa,sBAAuB,SAAQ,0CAAsB;IAGjE;QACC,KAAK,cAAmC,CAAC;QAH1C;;;;mBAAgC,YAA0C;WAAC;IAI3E,CAAC;CACD;AAND,wDAMC","sourcesContent":["import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { SlashCommandOptionBase } from '../mixins/CommandOptionBase';\n\nexport class SlashCommandRoleOption extends SlashCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Role as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.Role);\n\t}\n}\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ApplicationCommandOptionType } from 'discord-api-types/v9';
|
|
2
|
-
import { ApplicationCommandOptionWithChoicesBase } from '../mixins/CommandOptionWithChoices';
|
|
3
|
-
export declare class SlashCommandStringOption extends ApplicationCommandOptionWithChoicesBase<string> {
|
|
4
|
-
readonly type: ApplicationCommandOptionType.String;
|
|
5
|
-
constructor();
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=string.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"string.d.ts","sourceRoot":"/","sources":["interactions/slashCommands/options/string.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,uCAAuC,EAAE,MAAM,oCAAoC,CAAC;AAE7F,qBAAa,wBAAyB,SAAQ,uCAAuC,CAAC,MAAM,CAAC;IAC5F,SAAyB,IAAI,sCAAgD;;CAK7E"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SlashCommandStringOption = void 0;
|
|
4
|
-
require("discord-api-types/v9");
|
|
5
|
-
const CommandOptionWithChoices_1 = require("../mixins/CommandOptionWithChoices");
|
|
6
|
-
class SlashCommandStringOption extends CommandOptionWithChoices_1.ApplicationCommandOptionWithChoicesBase {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(3 /* String */);
|
|
9
|
-
Object.defineProperty(this, "type", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
configurable: true,
|
|
12
|
-
writable: true,
|
|
13
|
-
value: 3 /* String */
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.SlashCommandStringOption = SlashCommandStringOption;
|
|
18
|
-
//# sourceMappingURL=string.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"string.js","sourceRoot":"/","sources":["interactions/slashCommands/options/string.ts"],"names":[],"mappings":";;;AAAA,gCAAoE;AACpE,iFAA6F;AAE7F,MAAa,wBAAyB,SAAQ,kEAA+C;IAG5F;QACC,KAAK,gBAAqC,CAAC;QAH5C;;;;mBAAgC,cAA4C;WAAC;IAI7E,CAAC;CACD;AAND,4DAMC","sourcesContent":["import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { ApplicationCommandOptionWithChoicesBase } from '../mixins/CommandOptionWithChoices';\n\nexport class SlashCommandStringOption extends ApplicationCommandOptionWithChoicesBase<string> {\n\tpublic override readonly type = ApplicationCommandOptionType.String as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.String);\n\t}\n}\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ApplicationCommandOptionType } from 'discord-api-types/v9';
|
|
2
|
-
import { SlashCommandOptionBase } from '../mixins/CommandOptionBase';
|
|
3
|
-
export declare class SlashCommandUserOption extends SlashCommandOptionBase {
|
|
4
|
-
readonly type: ApplicationCommandOptionType.User;
|
|
5
|
-
constructor();
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=user.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"/","sources":["interactions/slashCommands/options/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,qBAAa,sBAAuB,SAAQ,sBAAsB;IACjE,SAAyB,IAAI,oCAA8C;;CAK3E"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SlashCommandUserOption = void 0;
|
|
4
|
-
require("discord-api-types/v9");
|
|
5
|
-
const CommandOptionBase_1 = require("../mixins/CommandOptionBase");
|
|
6
|
-
class SlashCommandUserOption extends CommandOptionBase_1.SlashCommandOptionBase {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(6 /* User */);
|
|
9
|
-
Object.defineProperty(this, "type", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
configurable: true,
|
|
12
|
-
writable: true,
|
|
13
|
-
value: 6 /* User */
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.SlashCommandUserOption = SlashCommandUserOption;
|
|
18
|
-
//# sourceMappingURL=user.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user.js","sourceRoot":"/","sources":["interactions/slashCommands/options/user.ts"],"names":[],"mappings":";;;AAAA,gCAAoE;AACpE,mEAAqE;AAErE,MAAa,sBAAuB,SAAQ,0CAAsB;IAGjE;QACC,KAAK,cAAmC,CAAC;QAH1C;;;;mBAAgC,YAA0C;WAAC;IAI3E,CAAC;CACD;AAND,wDAMC","sourcesContent":["import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { SlashCommandOptionBase } from '../mixins/CommandOptionBase';\n\nexport class SlashCommandUserOption extends SlashCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.User as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.User);\n\t}\n}\n"]}
|