-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,3 @@ logs/ | |
|
||
# Autogenerated | ||
coverage/ | ||
dist/ |
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 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.