@went.tf/discord-bot-framework 2.0.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/LICENSE +21 -0
- package/README.md +550 -0
- package/build/.tsbuildinfo +1 -0
- package/build/api-client/api-client.d.ts +13 -0
- package/build/api-client/api-client.d.ts.map +1 -0
- package/build/api-client/api-client.js +147 -0
- package/build/api-client/api-client.js.map +1 -0
- package/build/api-client/api-http-exception.d.ts +7 -0
- package/build/api-client/api-http-exception.d.ts.map +1 -0
- package/build/api-client/api-http-exception.js +12 -0
- package/build/api-client/api-http-exception.js.map +1 -0
- package/build/api-client/index.d.ts +4 -0
- package/build/api-client/index.d.ts.map +1 -0
- package/build/api-client/index.js +4 -0
- package/build/api-client/index.js.map +1 -0
- package/build/api-client/types.d.ts +105 -0
- package/build/api-client/types.d.ts.map +1 -0
- package/build/api-client/types.js +8 -0
- package/build/api-client/types.js.map +1 -0
- package/build/client/create-bot-client.d.ts +14 -0
- package/build/client/create-bot-client.d.ts.map +1 -0
- package/build/client/create-bot-client.js +19 -0
- package/build/client/create-bot-client.js.map +1 -0
- package/build/client/create-shard-manager.d.ts +17 -0
- package/build/client/create-shard-manager.d.ts.map +1 -0
- package/build/client/create-shard-manager.js +26 -0
- package/build/client/create-shard-manager.js.map +1 -0
- package/build/client/index.d.ts +3 -0
- package/build/client/index.d.ts.map +1 -0
- package/build/client/index.js +3 -0
- package/build/client/index.js.map +1 -0
- package/build/commands/build-application-commands-body.d.ts +39 -0
- package/build/commands/build-application-commands-body.d.ts.map +1 -0
- package/build/commands/build-application-commands-body.js +127 -0
- package/build/commands/build-application-commands-body.js.map +1 -0
- package/build/commands/fixed-reply-command-factory.d.ts +10 -0
- package/build/commands/fixed-reply-command-factory.d.ts.map +1 -0
- package/build/commands/fixed-reply-command-factory.js +19 -0
- package/build/commands/fixed-reply-command-factory.js.map +1 -0
- package/build/commands/index.d.ts +4 -0
- package/build/commands/index.d.ts.map +1 -0
- package/build/commands/index.js +4 -0
- package/build/commands/index.js.map +1 -0
- package/build/commands/registration.d.ts +24 -0
- package/build/commands/registration.d.ts.map +1 -0
- package/build/commands/registration.js +69 -0
- package/build/commands/registration.js.map +1 -0
- package/build/commands/schema/application-command-leaf-option.schema.d.ts +230 -0
- package/build/commands/schema/application-command-leaf-option.schema.d.ts.map +1 -0
- package/build/commands/schema/application-command-leaf-option.schema.js +129 -0
- package/build/commands/schema/application-command-leaf-option.schema.js.map +1 -0
- package/build/commands/schema/application-command-leaf-option.schema.json +258 -0
- package/build/commands/schema/application-command-option-choice.schema.d.ts +18 -0
- package/build/commands/schema/application-command-option-choice.schema.d.ts.map +1 -0
- package/build/commands/schema/application-command-option-choice.schema.js +12 -0
- package/build/commands/schema/application-command-option-choice.schema.js.map +1 -0
- package/build/commands/schema/application-command-option-choice.schema.json +23 -0
- package/build/commands/schema/application-command-option.schema.d.ts +12 -0
- package/build/commands/schema/application-command-option.schema.d.ts.map +1 -0
- package/build/commands/schema/application-command-option.schema.js +13 -0
- package/build/commands/schema/application-command-option.schema.js.map +1 -0
- package/build/commands/schema/application-command-option.schema.json +14 -0
- package/build/commands/schema/application-command-subcommand-group.schema.d.ts +28 -0
- package/build/commands/schema/application-command-subcommand-group.schema.d.ts.map +1 -0
- package/build/commands/schema/application-command-subcommand-group.schema.js +22 -0
- package/build/commands/schema/application-command-subcommand-group.schema.js.map +1 -0
- package/build/commands/schema/application-command-subcommand-group.schema.json +26 -0
- package/build/commands/schema/application-command-subcommand.schema.d.ts +29 -0
- package/build/commands/schema/application-command-subcommand.schema.d.ts.map +1 -0
- package/build/commands/schema/application-command-subcommand.schema.js +23 -0
- package/build/commands/schema/application-command-subcommand.schema.js.map +1 -0
- package/build/commands/schema/application-command-subcommand.schema.json +26 -0
- package/build/commands/schema/application-command-type.schema.d.ts +6 -0
- package/build/commands/schema/application-command-type.schema.d.ts.map +1 -0
- package/build/commands/schema/application-command-type.schema.js +6 -0
- package/build/commands/schema/application-command-type.schema.js.map +1 -0
- package/build/commands/schema/application-command-type.schema.json +9 -0
- package/build/commands/schema/application-integration-type.schema.d.ts +6 -0
- package/build/commands/schema/application-integration-type.schema.d.ts.map +1 -0
- package/build/commands/schema/application-integration-type.schema.js +6 -0
- package/build/commands/schema/application-integration-type.schema.js.map +1 -0
- package/build/commands/schema/application-integration-type.schema.json +8 -0
- package/build/commands/schema/channel-type.schema.d.ts +6 -0
- package/build/commands/schema/channel-type.schema.d.ts.map +1 -0
- package/build/commands/schema/channel-type.schema.js +6 -0
- package/build/commands/schema/channel-type.schema.js.map +1 -0
- package/build/commands/schema/channel-type.schema.json +16 -0
- package/build/commands/schema/chat-input-command.schema.d.ts +45 -0
- package/build/commands/schema/chat-input-command.schema.d.ts.map +1 -0
- package/build/commands/schema/chat-input-command.schema.js +34 -0
- package/build/commands/schema/chat-input-command.schema.js.map +1 -0
- package/build/commands/schema/chat-input-command.schema.json +46 -0
- package/build/commands/schema/commands-file.schema.d.ts +18 -0
- package/build/commands/schema/commands-file.schema.d.ts.map +1 -0
- package/build/commands/schema/commands-file.schema.js +16 -0
- package/build/commands/schema/commands-file.schema.js.map +1 -0
- package/build/commands/schema/commands-file.schema.json +14 -0
- package/build/commands/schema/context-menu-command.schema.d.ts +40 -0
- package/build/commands/schema/context-menu-command.schema.d.ts.map +1 -0
- package/build/commands/schema/context-menu-command.schema.js +32 -0
- package/build/commands/schema/context-menu-command.schema.js.map +1 -0
- package/build/commands/schema/context-menu-command.schema.json +40 -0
- package/build/commands/schema/context-menu-name.schema.d.ts +7 -0
- package/build/commands/schema/context-menu-name.schema.d.ts.map +1 -0
- package/build/commands/schema/context-menu-name.schema.js +7 -0
- package/build/commands/schema/context-menu-name.schema.js.map +1 -0
- package/build/commands/schema/context-menu-name.schema.json +6 -0
- package/build/commands/schema/default-member-permissions.schema.d.ts +7 -0
- package/build/commands/schema/default-member-permissions.schema.d.ts.map +1 -0
- package/build/commands/schema/default-member-permissions.schema.js +7 -0
- package/build/commands/schema/default-member-permissions.schema.js.map +1 -0
- package/build/commands/schema/default-member-permissions.schema.json +6 -0
- package/build/commands/schema/index.d.ts +77 -0
- package/build/commands/schema/index.d.ts.map +1 -0
- package/build/commands/schema/index.js +48 -0
- package/build/commands/schema/index.js.map +1 -0
- package/build/commands/schema/interaction-context-type.schema.d.ts +6 -0
- package/build/commands/schema/interaction-context-type.schema.d.ts.map +1 -0
- package/build/commands/schema/interaction-context-type.schema.js +6 -0
- package/build/commands/schema/interaction-context-type.schema.js.map +1 -0
- package/build/commands/schema/interaction-context-type.schema.json +9 -0
- package/build/commands/schema/option-name.schema.d.ts +7 -0
- package/build/commands/schema/option-name.schema.d.ts.map +1 -0
- package/build/commands/schema/option-name.schema.js +7 -0
- package/build/commands/schema/option-name.schema.js.map +1 -0
- package/build/commands/schema/option-name.schema.json +6 -0
- package/build/commands/schema/parse-commands-file.d.ts +19 -0
- package/build/commands/schema/parse-commands-file.d.ts.map +1 -0
- package/build/commands/schema/parse-commands-file.js +19 -0
- package/build/commands/schema/parse-commands-file.js.map +1 -0
- package/build/db/create-postgres-prisma-db.d.ts +20 -0
- package/build/db/create-postgres-prisma-db.d.ts.map +1 -0
- package/build/db/create-postgres-prisma-db.js +17 -0
- package/build/db/create-postgres-prisma-db.js.map +1 -0
- package/build/db/index.d.ts +2 -0
- package/build/db/index.d.ts.map +1 -0
- package/build/db/index.js +2 -0
- package/build/db/index.js.map +1 -0
- package/build/dev/create-handler-watcher.d.ts +23 -0
- package/build/dev/create-handler-watcher.d.ts.map +1 -0
- package/build/dev/create-handler-watcher.js +55 -0
- package/build/dev/create-handler-watcher.js.map +1 -0
- package/build/dev/create-source-reloader.d.ts +37 -0
- package/build/dev/create-source-reloader.d.ts.map +1 -0
- package/build/dev/create-source-reloader.js +42 -0
- package/build/dev/create-source-reloader.js.map +1 -0
- package/build/dev/index.d.ts +3 -0
- package/build/dev/index.d.ts.map +1 -0
- package/build/dev/index.js +3 -0
- package/build/dev/index.js.map +1 -0
- package/build/dev/reload-loader.d.ts +11 -0
- package/build/dev/reload-loader.d.ts.map +1 -0
- package/build/dev/reload-loader.js +28 -0
- package/build/dev/reload-loader.js.map +1 -0
- package/build/env/define-env.d.ts +25 -0
- package/build/env/define-env.d.ts.map +1 -0
- package/build/env/define-env.js +24 -0
- package/build/env/define-env.js.map +1 -0
- package/build/env/helpers.d.ts +9 -0
- package/build/env/helpers.d.ts.map +1 -0
- package/build/env/helpers.js +9 -0
- package/build/env/helpers.js.map +1 -0
- package/build/env/index.d.ts +3 -0
- package/build/env/index.d.ts.map +1 -0
- package/build/env/index.js +3 -0
- package/build/env/index.js.map +1 -0
- package/build/i18n/create-command-localizer.d.ts +27 -0
- package/build/i18n/create-command-localizer.d.ts.map +1 -0
- package/build/i18n/create-command-localizer.js +40 -0
- package/build/i18n/create-command-localizer.js.map +1 -0
- package/build/i18n/create-i18n-initializer.d.ts +18 -0
- package/build/i18n/create-i18n-initializer.d.ts.map +1 -0
- package/build/i18n/create-i18n-initializer.js +34 -0
- package/build/i18n/create-i18n-initializer.js.map +1 -0
- package/build/i18n/index.d.ts +3 -0
- package/build/i18n/index.d.ts.map +1 -0
- package/build/i18n/index.js +3 -0
- package/build/i18n/index.js.map +1 -0
- package/build/index.d.ts +8 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +12 -0
- package/build/index.js.map +1 -0
- package/build/interactions/custom-id.d.ts +9 -0
- package/build/interactions/custom-id.d.ts.map +1 -0
- package/build/interactions/custom-id.js +15 -0
- package/build/interactions/custom-id.js.map +1 -0
- package/build/interactions/dispatch.d.ts +35 -0
- package/build/interactions/dispatch.d.ts.map +1 -0
- package/build/interactions/dispatch.js +87 -0
- package/build/interactions/dispatch.js.map +1 -0
- package/build/interactions/handle-interaction-error.d.ts +22 -0
- package/build/interactions/handle-interaction-error.d.ts.map +1 -0
- package/build/interactions/handle-interaction-error.js +65 -0
- package/build/interactions/handle-interaction-error.js.map +1 -0
- package/build/interactions/index.d.ts +7 -0
- package/build/interactions/index.d.ts.map +1 -0
- package/build/interactions/index.js +7 -0
- package/build/interactions/index.js.map +1 -0
- package/build/interactions/registry.d.ts +32 -0
- package/build/interactions/registry.d.ts.map +1 -0
- package/build/interactions/registry.js +49 -0
- package/build/interactions/registry.js.map +1 -0
- package/build/interactions/router.d.ts +28 -0
- package/build/interactions/router.d.ts.map +1 -0
- package/build/interactions/router.js +48 -0
- package/build/interactions/router.js.map +1 -0
- package/build/interactions/types.d.ts +37 -0
- package/build/interactions/types.d.ts.map +1 -0
- package/build/interactions/types.js +2 -0
- package/build/interactions/types.js.map +1 -0
- package/build/logger/create-logger.d.ts +27 -0
- package/build/logger/create-logger.d.ts.map +1 -0
- package/build/logger/create-logger.js +36 -0
- package/build/logger/create-logger.js.map +1 -0
- package/build/logger/dev-null-logger.d.ts +11 -0
- package/build/logger/dev-null-logger.d.ts.map +1 -0
- package/build/logger/dev-null-logger.js +19 -0
- package/build/logger/dev-null-logger.js.map +1 -0
- package/build/logger/discord-webhook-batcher.d.ts +38 -0
- package/build/logger/discord-webhook-batcher.d.ts.map +1 -0
- package/build/logger/discord-webhook-batcher.js +87 -0
- package/build/logger/discord-webhook-batcher.js.map +1 -0
- package/build/logger/discord-webhook-transport.d.ts +9 -0
- package/build/logger/discord-webhook-transport.d.ts.map +1 -0
- package/build/logger/discord-webhook-transport.js +20 -0
- package/build/logger/discord-webhook-transport.js.map +1 -0
- package/build/logger/index.d.ts +5 -0
- package/build/logger/index.d.ts.map +1 -0
- package/build/logger/index.js +5 -0
- package/build/logger/index.js.map +1 -0
- package/build/logger/logger.d.ts +30 -0
- package/build/logger/logger.d.ts.map +1 -0
- package/build/logger/logger.js +84 -0
- package/build/logger/logger.js.map +1 -0
- package/build/logger/pino-pretty-options.d.ts +12 -0
- package/build/logger/pino-pretty-options.d.ts.map +1 -0
- package/build/logger/pino-pretty-options.js +17 -0
- package/build/logger/pino-pretty-options.js.map +1 -0
- package/build/logger/types.d.ts +6 -0
- package/build/logger/types.d.ts.map +1 -0
- package/build/logger/types.js +2 -0
- package/build/logger/types.js.map +1 -0
- package/build/utils/discord-lookups.d.ts +16 -0
- package/build/utils/discord-lookups.d.ts.map +1 -0
- package/build/utils/discord-lookups.js +39 -0
- package/build/utils/discord-lookups.js.map +1 -0
- package/build/utils/get-git-data.d.ts +8 -0
- package/build/utils/get-git-data.d.ts.map +1 -0
- package/build/utils/get-git-data.js +18 -0
- package/build/utils/get-git-data.js.map +1 -0
- package/build/utils/index.d.ts +7 -0
- package/build/utils/index.d.ts.map +1 -0
- package/build/utils/index.js +7 -0
- package/build/utils/index.js.map +1 -0
- package/build/utils/messaging.d.ts +15 -0
- package/build/utils/messaging.d.ts.map +1 -0
- package/build/utils/messaging.js +71 -0
- package/build/utils/messaging.js.map +1 -0
- package/build/utils/promises.d.ts +6 -0
- package/build/utils/promises.d.ts.map +1 -0
- package/build/utils/promises.js +13 -0
- package/build/utils/promises.js.map +1 -0
- package/build/utils/run-attempts.d.ts +6 -0
- package/build/utils/run-attempts.d.ts.map +1 -0
- package/build/utils/run-attempts.js +16 -0
- package/build/utils/run-attempts.js.map +1 -0
- package/build/utils/strings.d.ts +7 -0
- package/build/utils/strings.d.ts.map +1 -0
- package/build/utils/strings.js +39 -0
- package/build/utils/strings.js.map +1 -0
- package/package.json +146 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://schema.went.tf/discord-bot-framework/application-command-option-choice.json",
|
|
3
|
+
"description": "APIApplicationCommandOptionChoice (discord-api-types), English-authored only - no name_localizations here (localization is layered on separately at submission time, not authored by hand).",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"name": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"minLength": 1,
|
|
9
|
+
"maxLength": 100
|
|
10
|
+
},
|
|
11
|
+
"value": {
|
|
12
|
+
"type": [
|
|
13
|
+
"string",
|
|
14
|
+
"number"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"required": [
|
|
19
|
+
"name",
|
|
20
|
+
"value"
|
|
21
|
+
],
|
|
22
|
+
"additionalProperties": false
|
|
23
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** A top-level command option: any leaf option, a Subcommand, or a SubcommandGroup. */
|
|
2
|
+
export declare const applicationCommandOptionSchema: {
|
|
3
|
+
readonly $id: "https://schema.went.tf/discord-bot-framework/application-command-option.json";
|
|
4
|
+
readonly oneOf: readonly [{
|
|
5
|
+
readonly $ref: "https://schema.went.tf/discord-bot-framework/application-command-leaf-option.json";
|
|
6
|
+
}, {
|
|
7
|
+
readonly $ref: "https://schema.went.tf/discord-bot-framework/application-command-subcommand.json";
|
|
8
|
+
}, {
|
|
9
|
+
readonly $ref: "https://schema.went.tf/discord-bot-framework/application-command-subcommand-group.json";
|
|
10
|
+
}];
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=application-command-option.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-command-option.schema.d.ts","sourceRoot":"","sources":["../../../src/commands/schema/application-command-option.schema.ts"],"names":[],"mappings":"AAIA,uFAAuF;AACvF,eAAO,MAAM,8BAA8B;;;;;;;;;CAOjC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { applicationCommandLeafOptionSchema } from './application-command-leaf-option.schema.js';
|
|
2
|
+
import { applicationCommandSubcommandGroupSchema } from './application-command-subcommand-group.schema.js';
|
|
3
|
+
import { applicationCommandSubcommandSchema } from './application-command-subcommand.schema.js';
|
|
4
|
+
/** A top-level command option: any leaf option, a Subcommand, or a SubcommandGroup. */
|
|
5
|
+
export const applicationCommandOptionSchema = {
|
|
6
|
+
$id: 'https://schema.went.tf/discord-bot-framework/application-command-option.json',
|
|
7
|
+
oneOf: [
|
|
8
|
+
{ $ref: applicationCommandLeafOptionSchema.$id },
|
|
9
|
+
{ $ref: applicationCommandSubcommandSchema.$id },
|
|
10
|
+
{ $ref: applicationCommandSubcommandGroupSchema.$id },
|
|
11
|
+
],
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=application-command-option.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-command-option.schema.js","sourceRoot":"","sources":["../../../src/commands/schema/application-command-option.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,6CAA6C,CAAC;AACjG,OAAO,EAAE,uCAAuC,EAAE,MAAM,kDAAkD,CAAC;AAC3G,OAAO,EAAE,kCAAkC,EAAE,MAAM,4CAA4C,CAAC;AAEhG,uFAAuF;AACvF,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,GAAG,EAAE,8EAA8E;IACnF,KAAK,EAAE;QACL,EAAE,IAAI,EAAE,kCAAkC,CAAC,GAAG,EAAE;QAChD,EAAE,IAAI,EAAE,kCAAkC,CAAC,GAAG,EAAE;QAChD,EAAE,IAAI,EAAE,uCAAuC,CAAC,GAAG,EAAE;KACtD;CACO,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://schema.went.tf/discord-bot-framework/application-command-option.json",
|
|
3
|
+
"oneOf": [
|
|
4
|
+
{
|
|
5
|
+
"$ref": "https://schema.went.tf/discord-bot-framework/application-command-leaf-option.json"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"$ref": "https://schema.went.tf/discord-bot-framework/application-command-subcommand.json"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"$ref": "https://schema.went.tf/discord-bot-framework/application-command-subcommand-group.json"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A SubcommandGroup option (type 2). Its own options may only be Subcommands -
|
|
3
|
+
* Discord allows exactly one level of subcommand-group -> subcommand nesting.
|
|
4
|
+
*/
|
|
5
|
+
export declare const applicationCommandSubcommandGroupSchema: {
|
|
6
|
+
readonly $id: "https://schema.went.tf/discord-bot-framework/application-command-subcommand-group.json";
|
|
7
|
+
readonly type: "object";
|
|
8
|
+
readonly properties: {
|
|
9
|
+
readonly name: {
|
|
10
|
+
readonly $ref: "https://schema.went.tf/discord-bot-framework/option-name.json";
|
|
11
|
+
};
|
|
12
|
+
readonly description: {
|
|
13
|
+
readonly type: "string";
|
|
14
|
+
};
|
|
15
|
+
readonly type: {
|
|
16
|
+
readonly const: 2;
|
|
17
|
+
};
|
|
18
|
+
readonly options: {
|
|
19
|
+
readonly type: "array";
|
|
20
|
+
readonly items: {
|
|
21
|
+
readonly $ref: "https://schema.went.tf/discord-bot-framework/application-command-subcommand.json";
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
readonly required: readonly ["name", "type"];
|
|
26
|
+
readonly additionalProperties: false;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=application-command-subcommand-group.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-command-subcommand-group.schema.d.ts","sourceRoot":"","sources":["../../../src/commands/schema/application-command-subcommand-group.schema.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,uCAAuC;;;;;;;;;;;;;;;;;;;;;;CAc1C,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { applicationCommandSubcommandSchema } from './application-command-subcommand.schema.js';
|
|
2
|
+
import { optionNameSchema } from './option-name.schema.js';
|
|
3
|
+
/**
|
|
4
|
+
* A SubcommandGroup option (type 2). Its own options may only be Subcommands -
|
|
5
|
+
* Discord allows exactly one level of subcommand-group -> subcommand nesting.
|
|
6
|
+
*/
|
|
7
|
+
export const applicationCommandSubcommandGroupSchema = {
|
|
8
|
+
$id: 'https://schema.went.tf/discord-bot-framework/application-command-subcommand-group.json',
|
|
9
|
+
type: 'object',
|
|
10
|
+
properties: {
|
|
11
|
+
name: { $ref: optionNameSchema.$id },
|
|
12
|
+
description: { type: 'string' },
|
|
13
|
+
type: { const: 2 },
|
|
14
|
+
options: {
|
|
15
|
+
type: 'array',
|
|
16
|
+
items: { $ref: applicationCommandSubcommandSchema.$id },
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
required: ['name', 'type'],
|
|
20
|
+
additionalProperties: false,
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=application-command-subcommand-group.schema.js.map
|
|
@@ -0,0 +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,KAAK,EAAE,CAAC,EAAE;QAClB,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"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://schema.went.tf/discord-bot-framework/application-command-subcommand-group.json",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"name": {
|
|
6
|
+
"$ref": "https://schema.went.tf/discord-bot-framework/option-name.json"
|
|
7
|
+
},
|
|
8
|
+
"description": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"type": {
|
|
12
|
+
"const": 2
|
|
13
|
+
},
|
|
14
|
+
"options": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"items": {
|
|
17
|
+
"$ref": "https://schema.went.tf/discord-bot-framework/application-command-subcommand.json"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"required": [
|
|
22
|
+
"name",
|
|
23
|
+
"type"
|
|
24
|
+
],
|
|
25
|
+
"additionalProperties": false
|
|
26
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A Subcommand option (type 1). Its own options may only be leaf options -
|
|
3
|
+
* Discord allows at most one level of subcommand-group -> subcommand nesting,
|
|
4
|
+
* so a subcommand can never contain another subcommand or subcommand group.
|
|
5
|
+
*/
|
|
6
|
+
export declare const applicationCommandSubcommandSchema: {
|
|
7
|
+
readonly $id: "https://schema.went.tf/discord-bot-framework/application-command-subcommand.json";
|
|
8
|
+
readonly type: "object";
|
|
9
|
+
readonly properties: {
|
|
10
|
+
readonly name: {
|
|
11
|
+
readonly $ref: "https://schema.went.tf/discord-bot-framework/option-name.json";
|
|
12
|
+
};
|
|
13
|
+
readonly description: {
|
|
14
|
+
readonly type: "string";
|
|
15
|
+
};
|
|
16
|
+
readonly type: {
|
|
17
|
+
readonly const: 1;
|
|
18
|
+
};
|
|
19
|
+
readonly options: {
|
|
20
|
+
readonly type: "array";
|
|
21
|
+
readonly items: {
|
|
22
|
+
readonly $ref: "https://schema.went.tf/discord-bot-framework/application-command-leaf-option.json";
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
readonly required: readonly ["name", "type"];
|
|
27
|
+
readonly additionalProperties: false;
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=application-command-subcommand.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-command-subcommand.schema.d.ts","sourceRoot":"","sources":["../../../src/commands/schema/application-command-subcommand.schema.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;CAcrC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { applicationCommandLeafOptionSchema } from './application-command-leaf-option.schema.js';
|
|
2
|
+
import { optionNameSchema } from './option-name.schema.js';
|
|
3
|
+
/**
|
|
4
|
+
* A Subcommand option (type 1). Its own options may only be leaf options -
|
|
5
|
+
* Discord allows at most one level of subcommand-group -> subcommand nesting,
|
|
6
|
+
* so a subcommand can never contain another subcommand or subcommand group.
|
|
7
|
+
*/
|
|
8
|
+
export const applicationCommandSubcommandSchema = {
|
|
9
|
+
$id: 'https://schema.went.tf/discord-bot-framework/application-command-subcommand.json',
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
name: { $ref: optionNameSchema.$id },
|
|
13
|
+
description: { type: 'string' },
|
|
14
|
+
type: { const: 1 },
|
|
15
|
+
options: {
|
|
16
|
+
type: 'array',
|
|
17
|
+
items: { $ref: applicationCommandLeafOptionSchema.$id },
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
required: ['name', 'type'],
|
|
21
|
+
additionalProperties: false,
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=application-command-subcommand.schema.js.map
|
|
@@ -0,0 +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,KAAK,EAAE,CAAC,EAAE;QAClB,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"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://schema.went.tf/discord-bot-framework/application-command-subcommand.json",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"name": {
|
|
6
|
+
"$ref": "https://schema.went.tf/discord-bot-framework/option-name.json"
|
|
7
|
+
},
|
|
8
|
+
"description": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"type": {
|
|
12
|
+
"const": 1
|
|
13
|
+
},
|
|
14
|
+
"options": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"items": {
|
|
17
|
+
"$ref": "https://schema.went.tf/discord-bot-framework/application-command-leaf-option.json"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"required": [
|
|
22
|
+
"name",
|
|
23
|
+
"type"
|
|
24
|
+
],
|
|
25
|
+
"additionalProperties": false
|
|
26
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const applicationCommandTypeSchema: {
|
|
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];
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=application-command-type.schema.d.ts.map
|
|
@@ -0,0 +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;;;;CAI/B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export const applicationCommandTypeSchema = {
|
|
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],
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=application-command-type.schema.js.map
|
|
@@ -0,0 +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,EAAE,iIAAiI;IAC9I,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;CACP,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
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": [
|
|
5
|
+
1,
|
|
6
|
+
2,
|
|
7
|
+
3
|
|
8
|
+
]
|
|
9
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const applicationIntegrationTypeSchema: {
|
|
2
|
+
readonly $id: "https://schema.went.tf/discord-bot-framework/application-integration-type.json";
|
|
3
|
+
readonly description: "ApplicationIntegrationType (discord-api-types): 0 GuildInstall, 1 UserInstall.";
|
|
4
|
+
readonly enum: readonly [0, 1];
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=application-integration-type.schema.d.ts.map
|
|
@@ -0,0 +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;;;;CAInC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export const applicationIntegrationTypeSchema = {
|
|
2
|
+
$id: 'https://schema.went.tf/discord-bot-framework/application-integration-type.json',
|
|
3
|
+
description: 'ApplicationIntegrationType (discord-api-types): 0 GuildInstall, 1 UserInstall.',
|
|
4
|
+
enum: [0, 1],
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=application-integration-type.schema.js.map
|
|
@@ -0,0 +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,EAAE,gFAAgF;IAC7F,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;CACJ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const channelTypeSchema: {
|
|
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];
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=channel-type.schema.d.ts.map
|
|
@@ -0,0 +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;;;;CAKpB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export const channelTypeSchema = {
|
|
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: [0, 2, 4, 5, 10, 11, 12, 13, 15, 16],
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=channel-type.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel-type.schema.js","sourceRoot":"","sources":["../../../src/commands/schema/channel-type.schema.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,GAAG,EAAE,gEAAgE;IACrE,WAAW,EACT,0MAA0M;IAC5M,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;CAClC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
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": [
|
|
5
|
+
0,
|
|
6
|
+
2,
|
|
7
|
+
4,
|
|
8
|
+
5,
|
|
9
|
+
10,
|
|
10
|
+
11,
|
|
11
|
+
12,
|
|
12
|
+
13,
|
|
13
|
+
15,
|
|
14
|
+
16
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** One CHAT_INPUT (slash command) entry. No dm_permission - deprecated by Discord in favor of contexts. */
|
|
2
|
+
export declare const chatInputCommandSchema: {
|
|
3
|
+
readonly $id: "https://schema.went.tf/discord-bot-framework/chat-input-command.json";
|
|
4
|
+
readonly type: "object";
|
|
5
|
+
readonly properties: {
|
|
6
|
+
readonly type: {
|
|
7
|
+
readonly const: 1;
|
|
8
|
+
};
|
|
9
|
+
readonly name: {
|
|
10
|
+
readonly $ref: "https://schema.went.tf/discord-bot-framework/option-name.json";
|
|
11
|
+
};
|
|
12
|
+
readonly description: {
|
|
13
|
+
readonly type: "string";
|
|
14
|
+
};
|
|
15
|
+
readonly options: {
|
|
16
|
+
readonly type: "array";
|
|
17
|
+
readonly items: {
|
|
18
|
+
readonly $ref: "https://schema.went.tf/discord-bot-framework/application-command-option.json";
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
readonly default_member_permissions: {
|
|
22
|
+
readonly $ref: "https://schema.went.tf/discord-bot-framework/default-member-permissions.json";
|
|
23
|
+
};
|
|
24
|
+
readonly contexts: {
|
|
25
|
+
readonly type: "array";
|
|
26
|
+
readonly items: {
|
|
27
|
+
readonly $ref: "https://schema.went.tf/discord-bot-framework/interaction-context-type.json";
|
|
28
|
+
};
|
|
29
|
+
readonly uniqueItems: true;
|
|
30
|
+
};
|
|
31
|
+
readonly integration_types: {
|
|
32
|
+
readonly type: "array";
|
|
33
|
+
readonly items: {
|
|
34
|
+
readonly $ref: "https://schema.went.tf/discord-bot-framework/application-integration-type.json";
|
|
35
|
+
};
|
|
36
|
+
readonly uniqueItems: true;
|
|
37
|
+
};
|
|
38
|
+
readonly nsfw: {
|
|
39
|
+
readonly type: "boolean";
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
readonly required: readonly ["type", "name"];
|
|
43
|
+
readonly additionalProperties: false;
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=chat-input-command.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-input-command.schema.d.ts","sourceRoot":"","sources":["../../../src/commands/schema/chat-input-command.schema.ts"],"names":[],"mappings":"AAMA,2GAA2G;AAC3G,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BzB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { applicationCommandOptionSchema } from './application-command-option.schema.js';
|
|
2
|
+
import { applicationIntegrationTypeSchema } from './application-integration-type.schema.js';
|
|
3
|
+
import { defaultMemberPermissionsSchema } from './default-member-permissions.schema.js';
|
|
4
|
+
import { interactionContextTypeSchema } from './interaction-context-type.schema.js';
|
|
5
|
+
import { optionNameSchema } from './option-name.schema.js';
|
|
6
|
+
/** One CHAT_INPUT (slash command) entry. No dm_permission - deprecated by Discord in favor of contexts. */
|
|
7
|
+
export const chatInputCommandSchema = {
|
|
8
|
+
$id: 'https://schema.went.tf/discord-bot-framework/chat-input-command.json',
|
|
9
|
+
type: 'object',
|
|
10
|
+
properties: {
|
|
11
|
+
type: { const: 1 },
|
|
12
|
+
name: { $ref: optionNameSchema.$id },
|
|
13
|
+
description: { type: 'string' },
|
|
14
|
+
options: {
|
|
15
|
+
type: 'array',
|
|
16
|
+
items: { $ref: applicationCommandOptionSchema.$id },
|
|
17
|
+
},
|
|
18
|
+
default_member_permissions: { $ref: defaultMemberPermissionsSchema.$id },
|
|
19
|
+
contexts: {
|
|
20
|
+
type: 'array',
|
|
21
|
+
items: { $ref: interactionContextTypeSchema.$id },
|
|
22
|
+
uniqueItems: true,
|
|
23
|
+
},
|
|
24
|
+
integration_types: {
|
|
25
|
+
type: 'array',
|
|
26
|
+
items: { $ref: applicationIntegrationTypeSchema.$id },
|
|
27
|
+
uniqueItems: true,
|
|
28
|
+
},
|
|
29
|
+
nsfw: { type: 'boolean' },
|
|
30
|
+
},
|
|
31
|
+
required: ['type', 'name'],
|
|
32
|
+
additionalProperties: false,
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=chat-input-command.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-input-command.schema.js","sourceRoot":"","sources":["../../../src/commands/schema/chat-input-command.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAC;AACxF,OAAO,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AAC5F,OAAO,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAC;AACxF,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,2GAA2G;AAC3G,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,GAAG,EAAE,sEAAsE;IAC3E,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;QAClB,IAAI,EAAE,EAAE,IAAI,EAAE,gBAAgB,CAAC,GAAG,EAAE;QACpC,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC/B,OAAO,EAAE;YACP,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAE,IAAI,EAAE,8BAA8B,CAAC,GAAG,EAAE;SACpD;QACD,0BAA0B,EAAE,EAAE,IAAI,EAAE,8BAA8B,CAAC,GAAG,EAAE;QACxE,QAAQ,EAAE;YACR,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAE,IAAI,EAAE,4BAA4B,CAAC,GAAG,EAAE;YACjD,WAAW,EAAE,IAAI;SAClB;QACD,iBAAiB,EAAE;YACjB,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAE,IAAI,EAAE,gCAAgC,CAAC,GAAG,EAAE;YACrD,WAAW,EAAE,IAAI;SAClB;QACD,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;KAC1B;IACD,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;IAC1B,oBAAoB,EAAE,KAAK;CACnB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://schema.went.tf/discord-bot-framework/chat-input-command.json",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"type": {
|
|
6
|
+
"const": 1
|
|
7
|
+
},
|
|
8
|
+
"name": {
|
|
9
|
+
"$ref": "https://schema.went.tf/discord-bot-framework/option-name.json"
|
|
10
|
+
},
|
|
11
|
+
"description": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
"options": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"items": {
|
|
17
|
+
"$ref": "https://schema.went.tf/discord-bot-framework/application-command-option.json"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"default_member_permissions": {
|
|
21
|
+
"$ref": "https://schema.went.tf/discord-bot-framework/default-member-permissions.json"
|
|
22
|
+
},
|
|
23
|
+
"contexts": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"items": {
|
|
26
|
+
"$ref": "https://schema.went.tf/discord-bot-framework/interaction-context-type.json"
|
|
27
|
+
},
|
|
28
|
+
"uniqueItems": true
|
|
29
|
+
},
|
|
30
|
+
"integration_types": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"items": {
|
|
33
|
+
"$ref": "https://schema.went.tf/discord-bot-framework/application-integration-type.json"
|
|
34
|
+
},
|
|
35
|
+
"uniqueItems": true
|
|
36
|
+
},
|
|
37
|
+
"nsfw": {
|
|
38
|
+
"type": "boolean"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"required": [
|
|
42
|
+
"type",
|
|
43
|
+
"name"
|
|
44
|
+
],
|
|
45
|
+
"additionalProperties": false
|
|
46
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The framework's base whole-file fragment: a flat array mirroring Discord's
|
|
3
|
+
* bulk-overwrite PUT body shape. Usable directly by bots with no extra
|
|
4
|
+
* constraints, or as the thing a bot's own commands.schema composes over
|
|
5
|
+
* (e.g. narrowing `name` to an enum of its actual command names) via allOf/$ref.
|
|
6
|
+
*/
|
|
7
|
+
export declare const commandsFileSchema: {
|
|
8
|
+
readonly $id: "https://schema.went.tf/discord-bot-framework/commands-file.json";
|
|
9
|
+
readonly type: "array";
|
|
10
|
+
readonly items: {
|
|
11
|
+
readonly oneOf: readonly [{
|
|
12
|
+
readonly $ref: "https://schema.went.tf/discord-bot-framework/chat-input-command.json";
|
|
13
|
+
}, {
|
|
14
|
+
readonly $ref: "https://schema.went.tf/discord-bot-framework/context-menu-command.json";
|
|
15
|
+
}];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=commands-file.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands-file.schema.d.ts","sourceRoot":"","sources":["../../../src/commands/schema/commands-file.schema.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;CAMrB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { chatInputCommandSchema } from './chat-input-command.schema.js';
|
|
2
|
+
import { contextMenuCommandSchema } from './context-menu-command.schema.js';
|
|
3
|
+
/**
|
|
4
|
+
* The framework's base whole-file fragment: a flat array mirroring Discord's
|
|
5
|
+
* bulk-overwrite PUT body shape. Usable directly by bots with no extra
|
|
6
|
+
* constraints, or as the thing a bot's own commands.schema composes over
|
|
7
|
+
* (e.g. narrowing `name` to an enum of its actual command names) via allOf/$ref.
|
|
8
|
+
*/
|
|
9
|
+
export const commandsFileSchema = {
|
|
10
|
+
$id: 'https://schema.went.tf/discord-bot-framework/commands-file.json',
|
|
11
|
+
type: 'array',
|
|
12
|
+
items: {
|
|
13
|
+
oneOf: [{ $ref: chatInputCommandSchema.$id }, { $ref: contextMenuCommandSchema.$id }],
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=commands-file.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands-file.schema.js","sourceRoot":"","sources":["../../../src/commands/schema/commands-file.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAE5E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,GAAG,EAAE,iEAAiE;IACtE,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACL,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,sBAAsB,CAAC,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,wBAAwB,CAAC,GAAG,EAAE,CAAC;KACtF;CACO,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://schema.went.tf/discord-bot-framework/commands-file.json",
|
|
3
|
+
"type": "array",
|
|
4
|
+
"items": {
|
|
5
|
+
"oneOf": [
|
|
6
|
+
{
|
|
7
|
+
"$ref": "https://schema.went.tf/discord-bot-framework/chat-input-command.json"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"$ref": "https://schema.went.tf/discord-bot-framework/context-menu-command.json"
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One USER or MESSAGE context-menu command entry. No description/options -
|
|
3
|
+
* Discord doesn't accept them for context-menu commands, and
|
|
4
|
+
* additionalProperties:false enforces that here (nothing enforced this before).
|
|
5
|
+
*/
|
|
6
|
+
export declare const contextMenuCommandSchema: {
|
|
7
|
+
readonly $id: "https://schema.went.tf/discord-bot-framework/context-menu-command.json";
|
|
8
|
+
readonly type: "object";
|
|
9
|
+
readonly properties: {
|
|
10
|
+
readonly type: {
|
|
11
|
+
readonly enum: readonly [2, 3];
|
|
12
|
+
};
|
|
13
|
+
readonly name: {
|
|
14
|
+
readonly $ref: "https://schema.went.tf/discord-bot-framework/context-menu-name.json";
|
|
15
|
+
};
|
|
16
|
+
readonly default_member_permissions: {
|
|
17
|
+
readonly $ref: "https://schema.went.tf/discord-bot-framework/default-member-permissions.json";
|
|
18
|
+
};
|
|
19
|
+
readonly contexts: {
|
|
20
|
+
readonly type: "array";
|
|
21
|
+
readonly items: {
|
|
22
|
+
readonly $ref: "https://schema.went.tf/discord-bot-framework/interaction-context-type.json";
|
|
23
|
+
};
|
|
24
|
+
readonly uniqueItems: true;
|
|
25
|
+
};
|
|
26
|
+
readonly integration_types: {
|
|
27
|
+
readonly type: "array";
|
|
28
|
+
readonly items: {
|
|
29
|
+
readonly $ref: "https://schema.went.tf/discord-bot-framework/application-integration-type.json";
|
|
30
|
+
};
|
|
31
|
+
readonly uniqueItems: true;
|
|
32
|
+
};
|
|
33
|
+
readonly nsfw: {
|
|
34
|
+
readonly type: "boolean";
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
readonly required: readonly ["type", "name"];
|
|
38
|
+
readonly additionalProperties: false;
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=context-menu-command.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-menu-command.schema.d.ts","sourceRoot":"","sources":["../../../src/commands/schema/context-menu-command.schema.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqB3B,CAAC"}
|