@went.tf/discord-bot-framework 2.0.0 → 2.1.0
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/README.md +22 -3
- package/build/.tsbuildinfo +1 -1
- package/build/commands/build-application-commands-body.d.ts +6 -0
- package/build/commands/build-application-commands-body.d.ts.map +1 -1
- package/build/commands/build-application-commands-body.js +34 -1
- package/build/commands/build-application-commands-body.js.map +1 -1
- package/build/commands/schema/application-command-leaf-option.schema.d.ts +9 -9
- package/build/commands/schema/application-command-leaf-option.schema.js +9 -9
- package/build/commands/schema/application-command-leaf-option.schema.js.map +1 -1
- package/build/commands/schema/application-command-leaf-option.schema.json +36 -9
- package/build/commands/schema/application-command-subcommand-group.schema.d.ts +1 -1
- package/build/commands/schema/application-command-subcommand-group.schema.js +1 -1
- package/build/commands/schema/application-command-subcommand-group.schema.js.map +1 -1
- package/build/commands/schema/application-command-subcommand-group.schema.json +4 -1
- package/build/commands/schema/application-command-subcommand.schema.d.ts +1 -1
- package/build/commands/schema/application-command-subcommand.schema.js +1 -1
- package/build/commands/schema/application-command-subcommand.schema.js.map +1 -1
- package/build/commands/schema/application-command-subcommand.schema.json +4 -1
- package/build/commands/schema/application-command-type.schema.d.ts +2 -2
- package/build/commands/schema/application-command-type.schema.d.ts.map +1 -1
- package/build/commands/schema/application-command-type.schema.js +2 -2
- package/build/commands/schema/application-command-type.schema.js.map +1 -1
- package/build/commands/schema/application-command-type.schema.json +5 -2
- package/build/commands/schema/application-integration-type.schema.d.ts +2 -2
- package/build/commands/schema/application-integration-type.schema.d.ts.map +1 -1
- package/build/commands/schema/application-integration-type.schema.js +2 -2
- package/build/commands/schema/application-integration-type.schema.js.map +1 -1
- package/build/commands/schema/application-integration-type.schema.json +4 -2
- package/build/commands/schema/channel-type.schema.d.ts +2 -2
- package/build/commands/schema/channel-type.schema.d.ts.map +1 -1
- package/build/commands/schema/channel-type.schema.js +6 -2
- package/build/commands/schema/channel-type.schema.js.map +1 -1
- package/build/commands/schema/channel-type.schema.json +12 -2
- package/build/commands/schema/chat-input-command.schema.d.ts +1 -1
- package/build/commands/schema/chat-input-command.schema.js +1 -1
- package/build/commands/schema/chat-input-command.schema.js.map +1 -1
- package/build/commands/schema/chat-input-command.schema.json +4 -1
- package/build/commands/schema/context-menu-command.schema.d.ts +1 -1
- package/build/commands/schema/context-menu-command.schema.js +1 -1
- package/build/commands/schema/context-menu-command.schema.js.map +1 -1
- package/build/commands/schema/context-menu-command.schema.json +3 -1
- package/build/commands/schema/enum-maps.d.ts +52 -0
- package/build/commands/schema/enum-maps.d.ts.map +1 -0
- package/build/commands/schema/enum-maps.js +54 -0
- package/build/commands/schema/enum-maps.js.map +1 -0
- package/build/commands/schema/index.d.ts +1 -0
- package/build/commands/schema/index.d.ts.map +1 -1
- package/build/commands/schema/index.js +1 -0
- package/build/commands/schema/index.js.map +1 -1
- package/build/commands/schema/interaction-context-type.schema.d.ts +2 -2
- package/build/commands/schema/interaction-context-type.schema.d.ts.map +1 -1
- package/build/commands/schema/interaction-context-type.schema.js +2 -2
- package/build/commands/schema/interaction-context-type.schema.js.map +1 -1
- package/build/commands/schema/interaction-context-type.schema.json +5 -2
- package/package.json +1 -1
|
@@ -30,6 +30,12 @@ export interface BuildApplicationCommandsBodyRegistries<Ctx extends BaseInteract
|
|
|
30
30
|
* expects from a validated commands.json array plus the bot's handler registries.
|
|
31
31
|
* `commandsFile`'s own order drives the output order (not registry insertion order).
|
|
32
32
|
*
|
|
33
|
+
* `type`/`contexts`/`integration_types`/`channel_types` may be authored in
|
|
34
|
+
* commands.json as either Discord's raw numeric values or the friendlier
|
|
35
|
+
* UPPER_SNAKE_CASE string aliases from `./schema/enum-maps.ts` - both forms
|
|
36
|
+
* are resolved to their real numeric value here, at the point each command/
|
|
37
|
+
* option is written into the final REST body, never earlier.
|
|
38
|
+
*
|
|
33
39
|
* Every commands.json entry must have a matching handler, and every handler must have
|
|
34
40
|
* a matching commands.json entry - both directions throw one combined error listing
|
|
35
41
|
* every offender, same as a command/option left with no resolvable description. This
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-application-commands-body.d.ts","sourceRoot":"","sources":["../../src/commands/build-application-commands-body.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,sCAAsC,EAAE,MAAM,uBAAuB,CAAC;AAC5G,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvG,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"build-application-commands-body.d.ts","sourceRoot":"","sources":["../../src/commands/build-application-commands-body.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,sCAAsC,EAAE,MAAM,uBAAuB,CAAC;AAC5G,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvG,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AASlE,OAAO,EAAuD,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1G,MAAM,MAAM,mBAAmB,GAAG,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,KAAK,MAAM,GAAG,SAAS,CAAC;AAClF,MAAM,MAAM,oBAAoB,GAAG,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;AAEnG,MAAM,WAAW,mCAAmC;IAClD,qFAAqF;IACrF,cAAc,CAAC,EAAE,OAAO,CAAC,sCAAsC,CAAC,CAAC;IACjE;;;;;;;OAOG;IACH,kBAAkB,CAAC,EAAE,mBAAmB,CAAC;IACzC,yFAAyF;IACzF,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC,yFAAyF;IACzF,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;CAC7C;AAED,MAAM,WAAW,sCAAsC,CACrD,GAAG,SAAS,sBAAsB,EAClC,aAAa,SAAS,MAAM,GAAG,MAAM,EACrC,eAAe,SAAS,MAAM,GAAG,MAAM;IAEvC,SAAS,CAAC,EAAE,QAAQ,CAAC,aAAa,EAAE,qBAAqB,CAAC,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC;IAC/E,WAAW,CAAC,EAAE,QAAQ,CAAC,eAAe,EAAE,uBAAuB,CAAC,GAAG,EAAE,eAAe,CAAC,CAAC,CAAC;CACxF;AAoFD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,4BAA4B,CAAC,GAAG,SAAS,sBAAsB,EAC7E,YAAY,EAAE,SAAS,gBAAgB,EAAE,EACzC,UAAU,EAAE,sCAAsC,CAAC,GAAG,CAAC,EACvD,OAAO,GAAE,mCAAwC,GAChD,sCAAsC,EAAE,CAoF1C"}
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
import { APPLICATION_COMMAND_OPTION_TYPE_MAP, APPLICATION_COMMAND_TYPE_MAP, APPLICATION_INTEGRATION_TYPE_MAP, CHANNEL_TYPE_MAP, INTERACTION_CONTEXT_TYPE_MAP, resolveEnumValue, } from './schema/enum-maps.js';
|
|
2
|
+
/**
|
|
3
|
+
* True for both the numeric (`1`) and UPPER_SNAKE_CASE string (`'CHAT_INPUT'`)
|
|
4
|
+
* form of a commands.json entry's `type` - commands.json accepts either, see
|
|
5
|
+
* `./schema/enum-maps.ts`. The real numeric value is only ever resolved right
|
|
6
|
+
* before a command/option is written into the final REST body below.
|
|
7
|
+
*/
|
|
8
|
+
function isChatInputType(type) {
|
|
9
|
+
return type === APPLICATION_COMMAND_TYPE_MAP.CHAT_INPUT || type === 'CHAT_INPUT';
|
|
10
|
+
}
|
|
1
11
|
function sortRequiredOptionsFirst(options) {
|
|
2
12
|
if (!options)
|
|
3
13
|
return options;
|
|
@@ -24,9 +34,15 @@ function resolveOptionsDescriptions(optionsList, basePath, ctx) {
|
|
|
24
34
|
const nestedOptions = 'options' in option && option.options
|
|
25
35
|
? resolveOptionsDescriptions(option.options, optionPath, ctx)
|
|
26
36
|
: undefined;
|
|
37
|
+
const resolvedType = resolveEnumValue(APPLICATION_COMMAND_OPTION_TYPE_MAP, option.type);
|
|
38
|
+
const channelTypes = 'channel_types' in option && option.channel_types
|
|
39
|
+
? option.channel_types.map((ct) => resolveEnumValue(CHANNEL_TYPE_MAP, ct))
|
|
40
|
+
: undefined;
|
|
27
41
|
return {
|
|
28
42
|
...option,
|
|
43
|
+
type: resolvedType,
|
|
29
44
|
description: description ?? '',
|
|
45
|
+
...(channelTypes ? { channel_types: channelTypes } : {}),
|
|
30
46
|
...(nameLocalizations ? { name_localizations: nameLocalizations } : {}),
|
|
31
47
|
...(descriptionLocalizations ? { description_localizations: descriptionLocalizations } : {}),
|
|
32
48
|
...(nestedOptions ? { options: nestedOptions } : {}),
|
|
@@ -51,6 +67,12 @@ function formatValidationErrors(unmatchedFileEntries, unmatchedHandlers, missing
|
|
|
51
67
|
* expects from a validated commands.json array plus the bot's handler registries.
|
|
52
68
|
* `commandsFile`'s own order drives the output order (not registry insertion order).
|
|
53
69
|
*
|
|
70
|
+
* `type`/`contexts`/`integration_types`/`channel_types` may be authored in
|
|
71
|
+
* commands.json as either Discord's raw numeric values or the friendlier
|
|
72
|
+
* UPPER_SNAKE_CASE string aliases from `./schema/enum-maps.ts` - both forms
|
|
73
|
+
* are resolved to their real numeric value here, at the point each command/
|
|
74
|
+
* option is written into the final REST body, never earlier.
|
|
75
|
+
*
|
|
54
76
|
* Every commands.json entry must have a matching handler, and every handler must have
|
|
55
77
|
* a matching commands.json entry - both directions throw one combined error listing
|
|
56
78
|
* every offender, same as a command/option left with no resolvable description. This
|
|
@@ -64,7 +86,7 @@ export function buildApplicationCommandsBody(commandsFile, registries, options =
|
|
|
64
86
|
const chatInputFileNames = new Set();
|
|
65
87
|
const contextMenuFileNames = new Set();
|
|
66
88
|
for (const entry of commandsFile) {
|
|
67
|
-
const isChatInput = entry.type
|
|
89
|
+
const isChatInput = isChatInputType(entry.type);
|
|
68
90
|
if (isChatInput) {
|
|
69
91
|
chatInputFileNames.add(entry.name);
|
|
70
92
|
}
|
|
@@ -79,6 +101,11 @@ export function buildApplicationCommandsBody(commandsFile, registries, options =
|
|
|
79
101
|
if (command.registerCondition && !command.registerCondition())
|
|
80
102
|
continue;
|
|
81
103
|
const nameLocalizations = localizeNames?.(['commands', entry.name, 'name']);
|
|
104
|
+
const resolvedType = isChatInput
|
|
105
|
+
? APPLICATION_COMMAND_TYPE_MAP.CHAT_INPUT
|
|
106
|
+
: resolveEnumValue(APPLICATION_COMMAND_TYPE_MAP, entry.type);
|
|
107
|
+
const contexts = entry.contexts?.map((c) => resolveEnumValue(INTERACTION_CONTEXT_TYPE_MAP, c));
|
|
108
|
+
const integrationTypes = entry.integration_types?.map((i) => resolveEnumValue(APPLICATION_INTEGRATION_TYPE_MAP, i));
|
|
82
109
|
if (isChatInput) {
|
|
83
110
|
const chatEntry = entry;
|
|
84
111
|
const description = chatEntry.description ?? resolveDescription?.(['commands', chatEntry.name, 'description']);
|
|
@@ -96,8 +123,11 @@ export function buildApplicationCommandsBody(commandsFile, registries, options =
|
|
|
96
123
|
body.push({
|
|
97
124
|
...sharedMetadata,
|
|
98
125
|
...chatEntry,
|
|
126
|
+
type: resolvedType,
|
|
99
127
|
description: description ?? '',
|
|
100
128
|
options: sortRequiredOptionsFirst(resolvedOptions),
|
|
129
|
+
...(contexts ? { contexts } : {}),
|
|
130
|
+
...(integrationTypes ? { integration_types: integrationTypes } : {}),
|
|
101
131
|
...(nameLocalizations ? { name_localizations: nameLocalizations } : {}),
|
|
102
132
|
...(descriptionLocalizations ? { description_localizations: descriptionLocalizations } : {}),
|
|
103
133
|
});
|
|
@@ -106,6 +136,9 @@ export function buildApplicationCommandsBody(commandsFile, registries, options =
|
|
|
106
136
|
body.push({
|
|
107
137
|
...sharedMetadata,
|
|
108
138
|
...entry,
|
|
139
|
+
type: resolvedType,
|
|
140
|
+
...(contexts ? { contexts } : {}),
|
|
141
|
+
...(integrationTypes ? { integration_types: integrationTypes } : {}),
|
|
109
142
|
...(nameLocalizations ? { name_localizations: nameLocalizations } : {}),
|
|
110
143
|
});
|
|
111
144
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-application-commands-body.js","sourceRoot":"","sources":["../../src/commands/build-application-commands-body.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"build-application-commands-body.js","sourceRoot":"","sources":["../../src/commands/build-application-commands-body.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,mCAAmC,EACnC,4BAA4B,EAC5B,gCAAgC,EAChC,gBAAgB,EAChB,4BAA4B,EAC5B,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAiC/B;;;;;GAKG;AACH,SAAS,eAAe,CAAC,IAAa;IACpC,OAAO,IAAI,KAAK,4BAA4B,CAAC,UAAU,IAAI,IAAI,KAAK,YAAY,CAAC;AACnF,CAAC;AAED,SAAS,wBAAwB,CAAC,OAAkD;IAClF,IAAI,CAAC,OAAO;QAAE,OAAO,OAAO,CAAC;IAC7B,OAAO,CAAC,GAAG,OAAO,CAAC;SAChB,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,KAAK,IAAI,CAAC,GAAG,MAAM,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC;SAC/G,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QACd,IAAI,SAAS,IAAI,MAAM,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YAC1C,OAAO,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,OAAO,CAAC,EAAiC,CAAC;QACzG,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,CAAC;AACP,CAAC;AAUD,SAAS,0BAA0B,CACjC,WAA4D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Aa,EAAE,CAAC;IACvC,KAAK,MAAM,IAAI,IAAI,UAAU,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE,EAAE,CAAC;QACrD,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClE,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,UAAU,CAAC,WAAW,EAAE,KAAK,IAAI,EAAE,EAAE,CAAC;QACvD,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpE,CAAC;IAED,IAAI,oBAAoB,CAAC,MAAM,IAAI,iBAAiB,CAAC,MAAM,IAAI,mBAAmB,CAAC,MAAM,EAAE,CAAC;QAC1F,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,oBAAoB,EAAE,iBAAiB,EAAE,mBAAmB,CAAC,CAAC,CAAC;IACxG,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -18,7 +18,7 @@ export declare const applicationCommandLeafOptionSchema: {
|
|
|
18
18
|
readonly type: "string";
|
|
19
19
|
};
|
|
20
20
|
readonly type: {
|
|
21
|
-
readonly
|
|
21
|
+
readonly enum: readonly [3, "STRING"];
|
|
22
22
|
};
|
|
23
23
|
readonly required: {
|
|
24
24
|
readonly type: "boolean";
|
|
@@ -55,7 +55,7 @@ export declare const applicationCommandLeafOptionSchema: {
|
|
|
55
55
|
readonly type: "string";
|
|
56
56
|
};
|
|
57
57
|
readonly type: {
|
|
58
|
-
readonly
|
|
58
|
+
readonly enum: readonly [4, "INTEGER"];
|
|
59
59
|
};
|
|
60
60
|
readonly required: {
|
|
61
61
|
readonly type: "boolean";
|
|
@@ -88,7 +88,7 @@ export declare const applicationCommandLeafOptionSchema: {
|
|
|
88
88
|
readonly type: "string";
|
|
89
89
|
};
|
|
90
90
|
readonly type: {
|
|
91
|
-
readonly
|
|
91
|
+
readonly enum: readonly [5, "BOOLEAN"];
|
|
92
92
|
};
|
|
93
93
|
readonly required: {
|
|
94
94
|
readonly type: "boolean";
|
|
@@ -106,7 +106,7 @@ export declare const applicationCommandLeafOptionSchema: {
|
|
|
106
106
|
readonly type: "string";
|
|
107
107
|
};
|
|
108
108
|
readonly type: {
|
|
109
|
-
readonly
|
|
109
|
+
readonly enum: readonly [6, "USER"];
|
|
110
110
|
};
|
|
111
111
|
readonly required: {
|
|
112
112
|
readonly type: "boolean";
|
|
@@ -124,7 +124,7 @@ export declare const applicationCommandLeafOptionSchema: {
|
|
|
124
124
|
readonly type: "string";
|
|
125
125
|
};
|
|
126
126
|
readonly type: {
|
|
127
|
-
readonly
|
|
127
|
+
readonly enum: readonly [7, "CHANNEL"];
|
|
128
128
|
};
|
|
129
129
|
readonly required: {
|
|
130
130
|
readonly type: "boolean";
|
|
@@ -148,7 +148,7 @@ export declare const applicationCommandLeafOptionSchema: {
|
|
|
148
148
|
readonly type: "string";
|
|
149
149
|
};
|
|
150
150
|
readonly type: {
|
|
151
|
-
readonly
|
|
151
|
+
readonly enum: readonly [8, "ROLE"];
|
|
152
152
|
};
|
|
153
153
|
readonly required: {
|
|
154
154
|
readonly type: "boolean";
|
|
@@ -166,7 +166,7 @@ export declare const applicationCommandLeafOptionSchema: {
|
|
|
166
166
|
readonly type: "string";
|
|
167
167
|
};
|
|
168
168
|
readonly type: {
|
|
169
|
-
readonly
|
|
169
|
+
readonly enum: readonly [9, "MENTIONABLE"];
|
|
170
170
|
};
|
|
171
171
|
readonly required: {
|
|
172
172
|
readonly type: "boolean";
|
|
@@ -184,7 +184,7 @@ export declare const applicationCommandLeafOptionSchema: {
|
|
|
184
184
|
readonly type: "string";
|
|
185
185
|
};
|
|
186
186
|
readonly type: {
|
|
187
|
-
readonly
|
|
187
|
+
readonly enum: readonly [10, "NUMBER"];
|
|
188
188
|
};
|
|
189
189
|
readonly required: {
|
|
190
190
|
readonly type: "boolean";
|
|
@@ -217,7 +217,7 @@ export declare const applicationCommandLeafOptionSchema: {
|
|
|
217
217
|
readonly type: "string";
|
|
218
218
|
};
|
|
219
219
|
readonly type: {
|
|
220
|
-
readonly
|
|
220
|
+
readonly enum: readonly [11, "ATTACHMENT"];
|
|
221
221
|
};
|
|
222
222
|
readonly required: {
|
|
223
223
|
readonly type: "boolean";
|
|
@@ -17,7 +17,7 @@ export const applicationCommandLeafOptionSchema = {
|
|
|
17
17
|
properties: {
|
|
18
18
|
name: { $ref: optionNameSchema.$id },
|
|
19
19
|
description: { type: 'string' },
|
|
20
|
-
type: {
|
|
20
|
+
type: { enum: [3, 'STRING'] },
|
|
21
21
|
required: { type: 'boolean' },
|
|
22
22
|
autocomplete: { type: 'boolean' },
|
|
23
23
|
choices: { type: 'array', items: { $ref: applicationCommandOptionChoiceSchema.$id } },
|
|
@@ -32,7 +32,7 @@ export const applicationCommandLeafOptionSchema = {
|
|
|
32
32
|
properties: {
|
|
33
33
|
name: { $ref: optionNameSchema.$id },
|
|
34
34
|
description: { type: 'string' },
|
|
35
|
-
type: {
|
|
35
|
+
type: { enum: [4, 'INTEGER'] },
|
|
36
36
|
required: { type: 'boolean' },
|
|
37
37
|
autocomplete: { type: 'boolean' },
|
|
38
38
|
choices: { type: 'array', items: { $ref: applicationCommandOptionChoiceSchema.$id } },
|
|
@@ -47,7 +47,7 @@ export const applicationCommandLeafOptionSchema = {
|
|
|
47
47
|
properties: {
|
|
48
48
|
name: { $ref: optionNameSchema.$id },
|
|
49
49
|
description: { type: 'string' },
|
|
50
|
-
type: {
|
|
50
|
+
type: { enum: [5, 'BOOLEAN'] },
|
|
51
51
|
required: { type: 'boolean' },
|
|
52
52
|
},
|
|
53
53
|
required: ['name', 'type'],
|
|
@@ -58,7 +58,7 @@ export const applicationCommandLeafOptionSchema = {
|
|
|
58
58
|
properties: {
|
|
59
59
|
name: { $ref: optionNameSchema.$id },
|
|
60
60
|
description: { type: 'string' },
|
|
61
|
-
type: {
|
|
61
|
+
type: { enum: [6, 'USER'] },
|
|
62
62
|
required: { type: 'boolean' },
|
|
63
63
|
},
|
|
64
64
|
required: ['name', 'type'],
|
|
@@ -69,7 +69,7 @@ export const applicationCommandLeafOptionSchema = {
|
|
|
69
69
|
properties: {
|
|
70
70
|
name: { $ref: optionNameSchema.$id },
|
|
71
71
|
description: { type: 'string' },
|
|
72
|
-
type: {
|
|
72
|
+
type: { enum: [7, 'CHANNEL'] },
|
|
73
73
|
required: { type: 'boolean' },
|
|
74
74
|
channel_types: { type: 'array', items: { $ref: channelTypeSchema.$id } },
|
|
75
75
|
},
|
|
@@ -81,7 +81,7 @@ export const applicationCommandLeafOptionSchema = {
|
|
|
81
81
|
properties: {
|
|
82
82
|
name: { $ref: optionNameSchema.$id },
|
|
83
83
|
description: { type: 'string' },
|
|
84
|
-
type: {
|
|
84
|
+
type: { enum: [8, 'ROLE'] },
|
|
85
85
|
required: { type: 'boolean' },
|
|
86
86
|
},
|
|
87
87
|
required: ['name', 'type'],
|
|
@@ -92,7 +92,7 @@ export const applicationCommandLeafOptionSchema = {
|
|
|
92
92
|
properties: {
|
|
93
93
|
name: { $ref: optionNameSchema.$id },
|
|
94
94
|
description: { type: 'string' },
|
|
95
|
-
type: {
|
|
95
|
+
type: { enum: [9, 'MENTIONABLE'] },
|
|
96
96
|
required: { type: 'boolean' },
|
|
97
97
|
},
|
|
98
98
|
required: ['name', 'type'],
|
|
@@ -103,7 +103,7 @@ export const applicationCommandLeafOptionSchema = {
|
|
|
103
103
|
properties: {
|
|
104
104
|
name: { $ref: optionNameSchema.$id },
|
|
105
105
|
description: { type: 'string' },
|
|
106
|
-
type: {
|
|
106
|
+
type: { enum: [10, 'NUMBER'] },
|
|
107
107
|
required: { type: 'boolean' },
|
|
108
108
|
autocomplete: { type: 'boolean' },
|
|
109
109
|
choices: { type: 'array', items: { $ref: applicationCommandOptionChoiceSchema.$id } },
|
|
@@ -118,7 +118,7 @@ export const applicationCommandLeafOptionSchema = {
|
|
|
118
118
|
properties: {
|
|
119
119
|
name: { $ref: optionNameSchema.$id },
|
|
120
120
|
description: { type: 'string' },
|
|
121
|
-
type: {
|
|
121
|
+
type: { enum: [11, 'ATTACHMENT'] },
|
|
122
122
|
required: { type: 'boolean' },
|
|
123
123
|
},
|
|
124
124
|
required: ['name', 'type'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-command-leaf-option.schema.js","sourceRoot":"","sources":["../../../src/commands/schema/application-command-leaf-option.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,+CAA+C,CAAC;AACrG,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,GAAG,EAAE,mFAAmF;IACxF,KAAK,EAAE;QACL;YACE,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,IAAI,EAAE,EAAE,IAAI,EAAE,gBAAgB,CAAC,GAAG,EAAE;gBACpC,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBAC/B,IAAI,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"application-command-leaf-option.schema.js","sourceRoot":"","sources":["../../../src/commands/schema/application-command-leaf-option.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,+CAA+C,CAAC;AACrG,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,GAAG,EAAE,mFAAmF;IACxF,KAAK,EAAE;QACL;YACE,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,IAAI,EAAE,EAAE,IAAI,EAAE,gBAAgB,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AAC,GAAG,EAAE,EAAE;gBACrF,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBAC7B,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;aAC9B;YACD,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;YAC1B,oBAAoB,EAAE,KAAK;SAC5B;QACD;YACE,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,IAAI,EAAE,EAAE,IAAI,EAAE,gBAAgB,CAAC,GAAG,EAAE;gBACpC,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBAC/B,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,YAAY,CAAC,EAAE;gBAClC,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;aAC9B;YACD,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;YAC1B,oBAAoB,EAAE,KAAK;SAC5B;KACF;CACO,CAAC"}
|
|
@@ -11,7 +11,10 @@
|
|
|
11
11
|
"type": "string"
|
|
12
12
|
},
|
|
13
13
|
"type": {
|
|
14
|
-
"
|
|
14
|
+
"enum": [
|
|
15
|
+
3,
|
|
16
|
+
"STRING"
|
|
17
|
+
]
|
|
15
18
|
},
|
|
16
19
|
"required": {
|
|
17
20
|
"type": "boolean"
|
|
@@ -52,7 +55,10 @@
|
|
|
52
55
|
"type": "string"
|
|
53
56
|
},
|
|
54
57
|
"type": {
|
|
55
|
-
"
|
|
58
|
+
"enum": [
|
|
59
|
+
4,
|
|
60
|
+
"INTEGER"
|
|
61
|
+
]
|
|
56
62
|
},
|
|
57
63
|
"required": {
|
|
58
64
|
"type": "boolean"
|
|
@@ -89,7 +95,10 @@
|
|
|
89
95
|
"type": "string"
|
|
90
96
|
},
|
|
91
97
|
"type": {
|
|
92
|
-
"
|
|
98
|
+
"enum": [
|
|
99
|
+
5,
|
|
100
|
+
"BOOLEAN"
|
|
101
|
+
]
|
|
93
102
|
},
|
|
94
103
|
"required": {
|
|
95
104
|
"type": "boolean"
|
|
@@ -111,7 +120,10 @@
|
|
|
111
120
|
"type": "string"
|
|
112
121
|
},
|
|
113
122
|
"type": {
|
|
114
|
-
"
|
|
123
|
+
"enum": [
|
|
124
|
+
6,
|
|
125
|
+
"USER"
|
|
126
|
+
]
|
|
115
127
|
},
|
|
116
128
|
"required": {
|
|
117
129
|
"type": "boolean"
|
|
@@ -133,7 +145,10 @@
|
|
|
133
145
|
"type": "string"
|
|
134
146
|
},
|
|
135
147
|
"type": {
|
|
136
|
-
"
|
|
148
|
+
"enum": [
|
|
149
|
+
7,
|
|
150
|
+
"CHANNEL"
|
|
151
|
+
]
|
|
137
152
|
},
|
|
138
153
|
"required": {
|
|
139
154
|
"type": "boolean"
|
|
@@ -161,7 +176,10 @@
|
|
|
161
176
|
"type": "string"
|
|
162
177
|
},
|
|
163
178
|
"type": {
|
|
164
|
-
"
|
|
179
|
+
"enum": [
|
|
180
|
+
8,
|
|
181
|
+
"ROLE"
|
|
182
|
+
]
|
|
165
183
|
},
|
|
166
184
|
"required": {
|
|
167
185
|
"type": "boolean"
|
|
@@ -183,7 +201,10 @@
|
|
|
183
201
|
"type": "string"
|
|
184
202
|
},
|
|
185
203
|
"type": {
|
|
186
|
-
"
|
|
204
|
+
"enum": [
|
|
205
|
+
9,
|
|
206
|
+
"MENTIONABLE"
|
|
207
|
+
]
|
|
187
208
|
},
|
|
188
209
|
"required": {
|
|
189
210
|
"type": "boolean"
|
|
@@ -205,7 +226,10 @@
|
|
|
205
226
|
"type": "string"
|
|
206
227
|
},
|
|
207
228
|
"type": {
|
|
208
|
-
"
|
|
229
|
+
"enum": [
|
|
230
|
+
10,
|
|
231
|
+
"NUMBER"
|
|
232
|
+
]
|
|
209
233
|
},
|
|
210
234
|
"required": {
|
|
211
235
|
"type": "boolean"
|
|
@@ -242,7 +266,10 @@
|
|
|
242
266
|
"type": "string"
|
|
243
267
|
},
|
|
244
268
|
"type": {
|
|
245
|
-
"
|
|
269
|
+
"enum": [
|
|
270
|
+
11,
|
|
271
|
+
"ATTACHMENT"
|
|
272
|
+
]
|
|
246
273
|
},
|
|
247
274
|
"required": {
|
|
248
275
|
"type": "boolean"
|
|
@@ -10,7 +10,7 @@ export const applicationCommandSubcommandGroupSchema = {
|
|
|
10
10
|
properties: {
|
|
11
11
|
name: { $ref: optionNameSchema.$id },
|
|
12
12
|
description: { type: 'string' },
|
|
13
|
-
type: {
|
|
13
|
+
type: { enum: [2, 'SUBCOMMAND_GROUP'] },
|
|
14
14
|
options: {
|
|
15
15
|
type: 'array',
|
|
16
16
|
items: { $ref: applicationCommandSubcommandSchema.$id },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-command-subcommand-group.schema.js","sourceRoot":"","sources":["../../../src/commands/schema/application-command-subcommand-group.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,4CAA4C,CAAC;AAChG,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;;GAGG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAAG;IACrD,GAAG,EAAE,wFAAwF;IAC7F,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,IAAI,EAAE,EAAE,IAAI,EAAE,gBAAgB,CAAC,GAAG,EAAE;QACpC,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC/B,IAAI,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"application-command-subcommand-group.schema.js","sourceRoot":"","sources":["../../../src/commands/schema/application-command-subcommand-group.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,4CAA4C,CAAC;AAChG,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;;GAGG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAAG;IACrD,GAAG,EAAE,wFAAwF;IAC7F,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,IAAI,EAAE,EAAE,IAAI,EAAE,gBAAgB,CAAC,GAAG,EAAE;QACpC,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC/B,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,kBAAkB,CAAC,EAAE;QACvC,OAAO,EAAE;YACP,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAE,IAAI,EAAE,kCAAkC,CAAC,GAAG,EAAE;SACxD;KACF;IACD,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;IAC1B,oBAAoB,EAAE,KAAK;CACnB,CAAC"}
|
|
@@ -11,7 +11,7 @@ export const applicationCommandSubcommandSchema = {
|
|
|
11
11
|
properties: {
|
|
12
12
|
name: { $ref: optionNameSchema.$id },
|
|
13
13
|
description: { type: 'string' },
|
|
14
|
-
type: {
|
|
14
|
+
type: { enum: [1, 'SUBCOMMAND'] },
|
|
15
15
|
options: {
|
|
16
16
|
type: 'array',
|
|
17
17
|
items: { $ref: applicationCommandLeafOptionSchema.$id },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-command-subcommand.schema.js","sourceRoot":"","sources":["../../../src/commands/schema/application-command-subcommand.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,6CAA6C,CAAC;AACjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;;;GAIG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,GAAG,EAAE,kFAAkF;IACvF,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,IAAI,EAAE,EAAE,IAAI,EAAE,gBAAgB,CAAC,GAAG,EAAE;QACpC,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC/B,IAAI,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"application-command-subcommand.schema.js","sourceRoot":"","sources":["../../../src/commands/schema/application-command-subcommand.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,6CAA6C,CAAC;AACjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;;;GAIG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,GAAG,EAAE,kFAAkF;IACvF,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,IAAI,EAAE,EAAE,IAAI,EAAE,gBAAgB,CAAC,GAAG,EAAE;QACpC,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC/B,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,YAAY,CAAC,EAAE;QACjC,OAAO,EAAE;YACP,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAE,IAAI,EAAE,kCAAkC,CAAC,GAAG,EAAE;SACxD;KACF;IACD,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;IAC1B,oBAAoB,EAAE,KAAK;CACnB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const applicationCommandTypeSchema: {
|
|
2
2
|
readonly $id: "https://schema.went.tf/discord-bot-framework/application-command-type.json";
|
|
3
|
-
readonly description: "ApplicationCommandType (discord-api-types). PrimaryEntryPoint (4) is intentionally excluded - no supported bot uses Activities.";
|
|
4
|
-
readonly enum: readonly [1, 2, 3];
|
|
3
|
+
readonly description: "ApplicationCommandType (discord-api-types). PrimaryEntryPoint (4) is intentionally excluded - no supported bot uses Activities. Both the numeric value and its UPPER_SNAKE_CASE string alias (see enum-maps.ts) are always valid.";
|
|
4
|
+
readonly enum: readonly [1, 2, 3, "CHAT_INPUT", "USER", "MESSAGE"];
|
|
5
5
|
};
|
|
6
6
|
//# sourceMappingURL=application-command-type.schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-command-type.schema.d.ts","sourceRoot":"","sources":["../../../src/commands/schema/application-command-type.schema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B;;;;
|
|
1
|
+
{"version":3,"file":"application-command-type.schema.d.ts","sourceRoot":"","sources":["../../../src/commands/schema/application-command-type.schema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B;;;;CAK/B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const applicationCommandTypeSchema = {
|
|
2
2
|
$id: 'https://schema.went.tf/discord-bot-framework/application-command-type.json',
|
|
3
|
-
description: 'ApplicationCommandType (discord-api-types). PrimaryEntryPoint (4) is intentionally excluded - no supported bot uses Activities.',
|
|
4
|
-
enum: [1, 2, 3],
|
|
3
|
+
description: 'ApplicationCommandType (discord-api-types). PrimaryEntryPoint (4) is intentionally excluded - no supported bot uses Activities. Both the numeric value and its UPPER_SNAKE_CASE string alias (see enum-maps.ts) are always valid.',
|
|
4
|
+
enum: [1, 2, 3, 'CHAT_INPUT', 'USER', 'MESSAGE'],
|
|
5
5
|
};
|
|
6
6
|
//# sourceMappingURL=application-command-type.schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-command-type.schema.js","sourceRoot":"","sources":["../../../src/commands/schema/application-command-type.schema.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,GAAG,EAAE,4EAA4E;IACjF,WAAW,
|
|
1
|
+
{"version":3,"file":"application-command-type.schema.js","sourceRoot":"","sources":["../../../src/commands/schema/application-command-type.schema.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,GAAG,EAAE,4EAA4E;IACjF,WAAW,EACT,mOAAmO;IACrO,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,CAAC;CACxC,CAAC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$id": "https://schema.went.tf/discord-bot-framework/application-command-type.json",
|
|
3
|
-
"description": "ApplicationCommandType (discord-api-types). PrimaryEntryPoint (4) is intentionally excluded - no supported bot uses Activities.",
|
|
3
|
+
"description": "ApplicationCommandType (discord-api-types). PrimaryEntryPoint (4) is intentionally excluded - no supported bot uses Activities. Both the numeric value and its UPPER_SNAKE_CASE string alias (see enum-maps.ts) are always valid.",
|
|
4
4
|
"enum": [
|
|
5
5
|
1,
|
|
6
6
|
2,
|
|
7
|
-
3
|
|
7
|
+
3,
|
|
8
|
+
"CHAT_INPUT",
|
|
9
|
+
"USER",
|
|
10
|
+
"MESSAGE"
|
|
8
11
|
]
|
|
9
12
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const applicationIntegrationTypeSchema: {
|
|
2
2
|
readonly $id: "https://schema.went.tf/discord-bot-framework/application-integration-type.json";
|
|
3
|
-
readonly description: "ApplicationIntegrationType (discord-api-types): 0
|
|
4
|
-
readonly enum: readonly [0, 1];
|
|
3
|
+
readonly description: "ApplicationIntegrationType (discord-api-types): 0/GUILD_INSTALL, 1/USER_INSTALL. Both the numeric value and its UPPER_SNAKE_CASE string alias (see enum-maps.ts) are always valid.";
|
|
4
|
+
readonly enum: readonly [0, 1, "GUILD_INSTALL", "USER_INSTALL"];
|
|
5
5
|
};
|
|
6
6
|
//# sourceMappingURL=application-integration-type.schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-integration-type.schema.d.ts","sourceRoot":"","sources":["../../../src/commands/schema/application-integration-type.schema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC;;;;
|
|
1
|
+
{"version":3,"file":"application-integration-type.schema.d.ts","sourceRoot":"","sources":["../../../src/commands/schema/application-integration-type.schema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC;;;;CAKnC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const applicationIntegrationTypeSchema = {
|
|
2
2
|
$id: 'https://schema.went.tf/discord-bot-framework/application-integration-type.json',
|
|
3
|
-
description: 'ApplicationIntegrationType (discord-api-types): 0
|
|
4
|
-
enum: [0, 1],
|
|
3
|
+
description: 'ApplicationIntegrationType (discord-api-types): 0/GUILD_INSTALL, 1/USER_INSTALL. Both the numeric value and its UPPER_SNAKE_CASE string alias (see enum-maps.ts) are always valid.',
|
|
4
|
+
enum: [0, 1, 'GUILD_INSTALL', 'USER_INSTALL'],
|
|
5
5
|
};
|
|
6
6
|
//# sourceMappingURL=application-integration-type.schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-integration-type.schema.js","sourceRoot":"","sources":["../../../src/commands/schema/application-integration-type.schema.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,GAAG,EAAE,gFAAgF;IACrF,WAAW,
|
|
1
|
+
{"version":3,"file":"application-integration-type.schema.js","sourceRoot":"","sources":["../../../src/commands/schema/application-integration-type.schema.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,GAAG,EAAE,gFAAgF;IACrF,WAAW,EACT,oLAAoL;IACtL,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,eAAe,EAAE,cAAc,CAAC;CACrC,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$id": "https://schema.went.tf/discord-bot-framework/application-integration-type.json",
|
|
3
|
-
"description": "ApplicationIntegrationType (discord-api-types): 0
|
|
3
|
+
"description": "ApplicationIntegrationType (discord-api-types): 0/GUILD_INSTALL, 1/USER_INSTALL. Both the numeric value and its UPPER_SNAKE_CASE string alias (see enum-maps.ts) are always valid.",
|
|
4
4
|
"enum": [
|
|
5
5
|
0,
|
|
6
|
-
1
|
|
6
|
+
1,
|
|
7
|
+
"GUILD_INSTALL",
|
|
8
|
+
"USER_INSTALL"
|
|
7
9
|
]
|
|
8
10
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const channelTypeSchema: {
|
|
2
2
|
readonly $id: "https://schema.went.tf/discord-bot-framework/channel-type.json";
|
|
3
|
-
readonly description: "ApplicationCommandOptionAllowedChannelType (discord-api-types): ChannelType excluding DM (1), GroupDM (3), GuildDirectory (14) - the subset Discord accepts in a Channel option's channel_types filter.";
|
|
4
|
-
readonly enum: readonly [0, 2, 4, 5, 10, 11, 12, 13, 15, 16];
|
|
3
|
+
readonly description: "ApplicationCommandOptionAllowedChannelType (discord-api-types): ChannelType excluding DM (1), GroupDM (3), GuildDirectory (14) - the subset Discord accepts in a Channel option's channel_types filter. Both the numeric value and its UPPER_SNAKE_CASE string alias (see enum-maps.ts) are always valid.";
|
|
4
|
+
readonly enum: readonly [0, 2, 4, 5, 10, 11, 12, 13, 15, 16, "GUILD_TEXT", "GUILD_VOICE", "GUILD_CATEGORY", "GUILD_ANNOUNCEMENT", "ANNOUNCEMENT_THREAD", "PUBLIC_THREAD", "PRIVATE_THREAD", "GUILD_STAGE_VOICE", "GUILD_FORUM", "GUILD_MEDIA"];
|
|
5
5
|
};
|
|
6
6
|
//# sourceMappingURL=channel-type.schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel-type.schema.d.ts","sourceRoot":"","sources":["../../../src/commands/schema/channel-type.schema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB;;;;
|
|
1
|
+
{"version":3,"file":"channel-type.schema.d.ts","sourceRoot":"","sources":["../../../src/commands/schema/channel-type.schema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB;;;;CASpB,CAAC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export const channelTypeSchema = {
|
|
2
2
|
$id: 'https://schema.went.tf/discord-bot-framework/channel-type.json',
|
|
3
|
-
description: 'ApplicationCommandOptionAllowedChannelType (discord-api-types): ChannelType excluding DM (1), GroupDM (3), GuildDirectory (14) - the subset Discord accepts in a Channel option\'s channel_types filter.',
|
|
4
|
-
enum: [
|
|
3
|
+
description: 'ApplicationCommandOptionAllowedChannelType (discord-api-types): ChannelType excluding DM (1), GroupDM (3), GuildDirectory (14) - the subset Discord accepts in a Channel option\'s channel_types filter. Both the numeric value and its UPPER_SNAKE_CASE string alias (see enum-maps.ts) are always valid.',
|
|
4
|
+
enum: [
|
|
5
|
+
0, 2, 4, 5, 10, 11, 12, 13, 15, 16,
|
|
6
|
+
'GUILD_TEXT', 'GUILD_VOICE', 'GUILD_CATEGORY', 'GUILD_ANNOUNCEMENT', 'ANNOUNCEMENT_THREAD',
|
|
7
|
+
'PUBLIC_THREAD', 'PRIVATE_THREAD', 'GUILD_STAGE_VOICE', 'GUILD_FORUM', 'GUILD_MEDIA',
|
|
8
|
+
],
|
|
5
9
|
};
|
|
6
10
|
//# sourceMappingURL=channel-type.schema.js.map
|