import type { APIApplicationCommandOption, LocalizationMap, Permissions, RESTPostAPIChatInputApplicationCommandsJSONBody } from 'discord-api-types/v10'; import { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder } from './SlashCommandSubcommands'; import { SharedNameAndDescription } from './mixins/NameAndDescription'; import { SharedCallback, callback, legacyCallback } from './mixins/Callback'; import { SharedSlashCommandOptions } from './mixins/SharedSlashCommandOptions'; export declare class SlashCommandBuilder { /** * The name of this slash command */ readonly name: string; readonly callback: callback; readonly execute: legacyCallback; /** * The class of this slash command */ readonly class: string; /** * The localized names for this command */ readonly name_localizations?: LocalizationMap; /** * The description of this slash command */ readonly description: string; /** * The localized descriptions for this command */ readonly description_localizations?: LocalizationMap; /** * The options of this slash command */ readonly options: ToAPIApplicationCommandOptions[]; /** * Whether the command is enabled by default when the app is added to a guild * * @deprecated This property is deprecated and will be removed in the future. * You should use {@link (SlashCommandBuilder:class).setDefaultMemberPermissions} or {@link (SlashCommandBuilder:class).setDMPermission} instead. */ readonly default_permission: boolean | undefined; /** * Set of permissions represented as a bit set for the command */ readonly default_member_permissions: Permissions | null | undefined; /** * Indicates whether the command is available in DMs with the application, only for globally-scoped commands. * By default, commands are visible. */ readonly dm_permission: boolean | undefined; /** * Whether this command is NSFW */ readonly nsfw: boolean | undefined; /** * Returns the final data that should be sent to Discord. * * @remarks * This method runs validations on the data before serializing it. * As such, it may throw an error if the data is invalid. */ toJSON(): RESTPostAPIChatInputApplicationCommandsJSONBody; /** * Sets whether the command is enabled by default when the application is added to a guild. * * @remarks * If set to `false`, you will have to later `PUT` the permissions for this command. * @param value - Whether or not to enable this command by default * @see https://discord.com/developers/docs/interactions/application-commands#permissions * @deprecated Use {@link (SlashCommandBuilder:class).setDefaultMemberPermissions} or {@link (SlashCommandBuilder:class).setDMPermission} instead. */ setDefaultPermission(value: boolean): this; /** * Sets the default permissions a member should have in order to run the command. * * @remarks * You can set this to `'0'` to disable the command by default. * @param permissions - The permissions bit field to set * @see https://discord.com/developers/docs/interactions/application-commands#permissions */ setDefaultMemberPermissions(permissions: Permissions | bigint | number | null | undefined): this; /** * Sets if the command is available in DMs with the application, only for globally-scoped commands. * By default, commands are visible. * * @param enabled - If the command should be enabled in DMs * @see https://discord.com/developers/docs/interactions/application-commands#permissions */ setDMPermission(enabled: boolean | null | undefined): this; /** * Sets whether this command is NSFW * * @param nsfw - Whether this command is NSFW */ setNSFW(nsfw?: boolean): this; /** * Adds a new subcommand group to this command * * @param input - A function that returns a subcommand group builder, or an already built builder */ addSubcommandGroup(input: SlashCommandSubcommandGroupBuilder | ((subcommandGroup: SlashCommandSubcommandGroupBuilder) => SlashCommandSubcommandGroupBuilder)): SlashCommandSubcommandsOnlyBuilder; /** * Adds a new subcommand to this command * * @param input - A function that returns a subcommand builder, or an already built builder */ addSubcommand(input: SlashCommandSubcommandBuilder | ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder)): SlashCommandSubcommandsOnlyBuilder; } export interface SlashCommandBuilder extends SharedNameAndDescription, SharedCallback, SharedSlashCommandOptions { } export interface SlashCommandSubcommandsOnlyBuilder extends Omit> { } export interface SlashCommandOptionsOnlyBuilder extends SharedNameAndDescription, SharedSlashCommandOptions, Pick { } export interface ToAPIApplicationCommandOptions { toJSON(): APIApplicationCommandOption; } //# sourceMappingURL=SlashCommandBuilder.d.ts.map