Skip to content

Commit

Permalink
🔧 build
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelScheit committed Aug 4, 2021
1 parent 3195457 commit b521235
Show file tree
Hide file tree
Showing 66 changed files with 1,369 additions and 4 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ logs/

# Autogenerated
coverage/
dist/
12 changes: 12 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export * from './messages/formatters';
export * as SlashCommandAssertions from './interactions/slashCommands/Assertions';
export * from './interactions/slashCommands/SlashCommandBuilder';
export * from './interactions/slashCommands/SlashCommandSubCommands';
export * from './interactions/slashCommands/options/boolean';
export * from './interactions/slashCommands/options/channel';
export * from './interactions/slashCommands/options/integer';
export * from './interactions/slashCommands/options/mentionable';
export * from './interactions/slashCommands/options/role';
export * from './interactions/slashCommands/options/string';
export * from './interactions/slashCommands/options/user';
//# sourceMappingURL=index.d.ts.map
1 change: 1 addition & 0 deletions dist/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions dist/interactions/slashCommands/Assertions.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type { APIApplicationCommandOptionChoice } from 'discord-api-types/v9';
import type { SlashCommandOptionBase } from './mixins/CommandOptionBase';
import type { ToAPIApplicationCommandOptions } from './SlashCommandBuilder';
import type { SlashCommandSubCommandBuilder, SlashCommandSubCommandGroupBuilder } from './SlashCommandSubCommands';
export declare function validateRequiredParameters(name: string, description: string, options: ToAPIApplicationCommandOptions[]): void;
export declare function validateName(name: unknown): asserts name is string;
export declare function validateDescription(description: unknown): asserts description is string;
export declare function validateMaxOptionsLength(options: unknown): asserts options is ToAPIApplicationCommandOptions[];
export declare function validateMaxChoicesLength(choices: APIApplicationCommandOptionChoice[]): void;
export declare function assertReturnOfBuilder<T extends SlashCommandOptionBase | SlashCommandSubCommandBuilder | SlashCommandSubCommandGroupBuilder>(input: unknown, ExpectedInstanceOf: new () => T): asserts input is T;
//# sourceMappingURL=Assertions.d.ts.map
1 change: 1 addition & 0 deletions dist/interactions/slashCommands/Assertions.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 58 additions & 0 deletions dist/interactions/slashCommands/Assertions.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/interactions/slashCommands/Assertions.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 50 additions & 0 deletions dist/interactions/slashCommands/SlashCommandBuilder.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import type { APIApplicationCommandOption } from 'discord-api-types/v9';
import { SharedNameAndDescription } from './mixins/NameAndDescription';
import { SharedSlashCommandOptions } from './mixins/CommandOptions';
import { SlashCommandSubCommandBuilder, SlashCommandSubCommandGroupBuilder } from './SlashCommandSubCommands';
export declare class SlashCommandBuilder {
/**
* The name of this slash command
*/
readonly name: string;
/**
* The description of this slash command
*/
readonly description: string;
/**
* The options of this slash command
*/
readonly options: ToAPIApplicationCommandOptions[];
/**
* Returns the final data that should be sent to Discord.
*
* **Note:** Calling this function will validate required properties based on their conditions.
*/
toJSON(): {
name: string;
description: string;
options: APIApplicationCommandOption[];
};
/**
* Adds a new sub command group to this command
* @param input A function that returns a sub command group builder, or an already built builder
*/
addSubCommandGroup(input: SlashCommandSubCommandGroupBuilder | ((subCommandGroup: SlashCommandSubCommandGroupBuilder) => SlashCommandSubCommandGroupBuilder)): SlashCommandSubCommandGroupsOnlyBuilder;
/**
* Adds a new sub command to this command
* @param input A function that returns a sub command builder, or an already built builder
*/
addSubCommand(input: SlashCommandSubCommandBuilder | ((subCommandGroup: SlashCommandSubCommandBuilder) => SlashCommandSubCommandBuilder)): SlashCommandSubCommandsOnlyBuilder;
}
export interface SlashCommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions {
}
export interface SlashCommandSubCommandsOnlyBuilder extends SharedNameAndDescription, Pick<SlashCommandBuilder, 'toJSON' | 'addSubCommand'> {
}
export interface SlashCommandSubCommandGroupsOnlyBuilder extends SharedNameAndDescription, Pick<SlashCommandBuilder, 'toJSON' | 'addSubCommandGroup'> {
}
export interface SlashCommandOptionsOnlyBuilder extends SharedNameAndDescription, SharedSlashCommandOptions, Pick<SlashCommandBuilder, 'toJSON'> {
}
export interface ToAPIApplicationCommandOptions {
toJSON(): APIApplicationCommandOption;
}
//# sourceMappingURL=SlashCommandBuilder.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b521235

Please sign in to comment.