Skip to content

Commit b521235

Browse files
committed
🔧 build
1 parent 3195457 commit b521235

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1369
-4
lines changed

Diff for: .gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@ logs/
1313

1414
# Autogenerated
1515
coverage/
16-
dist/

Diff for: dist/index.d.ts

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export * from './messages/formatters';
2+
export * as SlashCommandAssertions from './interactions/slashCommands/Assertions';
3+
export * from './interactions/slashCommands/SlashCommandBuilder';
4+
export * from './interactions/slashCommands/SlashCommandSubCommands';
5+
export * from './interactions/slashCommands/options/boolean';
6+
export * from './interactions/slashCommands/options/channel';
7+
export * from './interactions/slashCommands/options/integer';
8+
export * from './interactions/slashCommands/options/mentionable';
9+
export * from './interactions/slashCommands/options/role';
10+
export * from './interactions/slashCommands/options/string';
11+
export * from './interactions/slashCommands/options/user';
12+
//# sourceMappingURL=index.d.ts.map

Diff for: dist/index.d.ts.map

+1
Original file line numberDiff line numberDiff line change

Diff for: dist/index.js

+16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: dist/index.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: dist/interactions/slashCommands/Assertions.d.ts

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import type { APIApplicationCommandOptionChoice } from 'discord-api-types/v9';
2+
import type { SlashCommandOptionBase } from './mixins/CommandOptionBase';
3+
import type { ToAPIApplicationCommandOptions } from './SlashCommandBuilder';
4+
import type { SlashCommandSubCommandBuilder, SlashCommandSubCommandGroupBuilder } from './SlashCommandSubCommands';
5+
export declare function validateRequiredParameters(name: string, description: string, options: ToAPIApplicationCommandOptions[]): void;
6+
export declare function validateName(name: unknown): asserts name is string;
7+
export declare function validateDescription(description: unknown): asserts description is string;
8+
export declare function validateMaxOptionsLength(options: unknown): asserts options is ToAPIApplicationCommandOptions[];
9+
export declare function validateMaxChoicesLength(choices: APIApplicationCommandOptionChoice[]): void;
10+
export declare function assertReturnOfBuilder<T extends SlashCommandOptionBase | SlashCommandSubCommandBuilder | SlashCommandSubCommandGroupBuilder>(input: unknown, ExpectedInstanceOf: new () => T): asserts input is T;
11+
//# sourceMappingURL=Assertions.d.ts.map

Diff for: dist/interactions/slashCommands/Assertions.d.ts.map

+1
Original file line numberDiff line numberDiff line change

Diff for: dist/interactions/slashCommands/Assertions.js

+58
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: dist/interactions/slashCommands/Assertions.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import type { APIApplicationCommandOption } from 'discord-api-types/v9';
2+
import { SharedNameAndDescription } from './mixins/NameAndDescription';
3+
import { SharedSlashCommandOptions } from './mixins/CommandOptions';
4+
import { SlashCommandSubCommandBuilder, SlashCommandSubCommandGroupBuilder } from './SlashCommandSubCommands';
5+
export declare class SlashCommandBuilder {
6+
/**
7+
* The name of this slash command
8+
*/
9+
readonly name: string;
10+
/**
11+
* The description of this slash command
12+
*/
13+
readonly description: string;
14+
/**
15+
* The options of this slash command
16+
*/
17+
readonly options: ToAPIApplicationCommandOptions[];
18+
/**
19+
* Returns the final data that should be sent to Discord.
20+
*
21+
* **Note:** Calling this function will validate required properties based on their conditions.
22+
*/
23+
toJSON(): {
24+
name: string;
25+
description: string;
26+
options: APIApplicationCommandOption[];
27+
};
28+
/**
29+
* Adds a new sub command group to this command
30+
* @param input A function that returns a sub command group builder, or an already built builder
31+
*/
32+
addSubCommandGroup(input: SlashCommandSubCommandGroupBuilder | ((subCommandGroup: SlashCommandSubCommandGroupBuilder) => SlashCommandSubCommandGroupBuilder)): SlashCommandSubCommandGroupsOnlyBuilder;
33+
/**
34+
* Adds a new sub command to this command
35+
* @param input A function that returns a sub command builder, or an already built builder
36+
*/
37+
addSubCommand(input: SlashCommandSubCommandBuilder | ((subCommandGroup: SlashCommandSubCommandBuilder) => SlashCommandSubCommandBuilder)): SlashCommandSubCommandsOnlyBuilder;
38+
}
39+
export interface SlashCommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions {
40+
}
41+
export interface SlashCommandSubCommandsOnlyBuilder extends SharedNameAndDescription, Pick<SlashCommandBuilder, 'toJSON' | 'addSubCommand'> {
42+
}
43+
export interface SlashCommandSubCommandGroupsOnlyBuilder extends SharedNameAndDescription, Pick<SlashCommandBuilder, 'toJSON' | 'addSubCommandGroup'> {
44+
}
45+
export interface SlashCommandOptionsOnlyBuilder extends SharedNameAndDescription, SharedSlashCommandOptions, Pick<SlashCommandBuilder, 'toJSON'> {
46+
}
47+
export interface ToAPIApplicationCommandOptions {
48+
toJSON(): APIApplicationCommandOption;
49+
}
50+
//# sourceMappingURL=SlashCommandBuilder.d.ts.map

Diff for: dist/interactions/slashCommands/SlashCommandBuilder.d.ts.map

+1
Original file line numberDiff line numberDiff line change

0 commit comments

Comments
 (0)