Class ApplicationCommandBuilder<T>

Type Parameters

Hierarchy

  • ApplicationCommandBuilder

Constructors

Properties

defaultMemberPermissions?: string
description?: string
descriptionLocalizations?: Record<string, string>
dmPermission?: boolean
name: string
nameLocalizations?: Record<string, string>
type: T

Methods

  • Add a description localization.

    Parameters

    • locale: string

      The locale of the localization.

    • description: string

      The localized description.

    Returns ApplicationCommandBuilder<T>

  • Add a name localization.

    Parameters

    • locale: string

      The locale of the localization.

    • name: string

      The localized name.

    Returns ApplicationCommandBuilder<T>

  • Allow this command to be used in direct messages.

    Returns ApplicationCommandBuilder<T>

  • Disallow this command from being used in direct messages.

    Returns ApplicationCommandBuilder<T>

  • Set if this command can be used in direct messages.

    Parameters

    • dmPermission: boolean

    Returns ApplicationCommandBuilder<T>

  • Set the default permissions required to use this command.

    Parameters

    • Rest ...permissions: ("CREATE_INSTANT_INVITE" | "KICK_MEMBERS" | "BAN_MEMBERS" | "ADMINISTRATOR" | "MANAGE_CHANNELS" | "MANAGE_GUILD" | "ADD_REACTIONS" | "VIEW_AUDIT_LOG" | "PRIORITY_SPEAKER" | "STREAM" | "VIEW_CHANNEL" | "SEND_MESSAGES" | "SEND_TTS_MESSAGES" | "MANAGE_MESSAGES" | "EMBED_LINKS" | "ATTACH_FILES" | "READ_MESSAGE_HISTORY" | "MENTION_EVERYONE" | "USE_EXTERNAL_EMOJIS" | "VIEW_GUILD_INSIGHTS" | "CONNECT" | "SPEAK" | "MUTE_MEMBERS" | "DEAFEN_MEMBERS" | "MOVE_MEMBERS" | "USE_VAD" | "CHANGE_NICKNAME" | "MANAGE_NICKNAMES" | "MANAGE_ROLES" | "MANAGE_WEBHOOKS" | "MANAGE_GUILD_EXPRESSIONS" | "MANAGE_EMOJIS_AND_STICKERS" | "USE_APPLICATION_COMMANDS" | "REQUEST_TO_SPEAK" | "MANAGE_EVENTS" | "MANAGE_THREADS" | "CREATE_PUBLIC_THREADS" | "CREATE_PRIVATE_THREADS" | "USE_EXTERNAL_STICKERS" | "SEND_MESSAGES_IN_THREADS" | "USE_EMBEDDED_ACTIVITIES" | "MODERATE_MEMBERS" | "VIEW_CREATOR_MONETIZATION_ANALYTICS" | "USE_SOUNDBOARD" | "CREATE_GUILD_EXPRESSIONS" | "CREATE_EVENTS" | "USE_EXTERNAL_SOUNDS" | "SEND_VOICE_MESSAGES")[] | [string | bigint | Permission | ("CREATE_INSTANT_INVITE" | "KICK_MEMBERS" | "BAN_MEMBERS" | "ADMINISTRATOR" | "MANAGE_CHANNELS" | "MANAGE_GUILD" | "ADD_REACTIONS" | "VIEW_AUDIT_LOG" | "PRIORITY_SPEAKER" | "STREAM" | "VIEW_CHANNEL" | "SEND_MESSAGES" | "SEND_TTS_MESSAGES" | "MANAGE_MESSAGES" | "EMBED_LINKS" | "ATTACH_FILES" | "READ_MESSAGE_HISTORY" | "MENTION_EVERYONE" | "USE_EXTERNAL_EMOJIS" | "VIEW_GUILD_INSIGHTS" | "CONNECT" | "SPEAK" | "MUTE_MEMBERS" | "DEAFEN_MEMBERS" | "MOVE_MEMBERS" | "USE_VAD" | "CHANGE_NICKNAME" | "MANAGE_NICKNAMES" | "MANAGE_ROLES" | "MANAGE_WEBHOOKS" | "MANAGE_GUILD_EXPRESSIONS" | "MANAGE_EMOJIS_AND_STICKERS" | "USE_APPLICATION_COMMANDS" | "REQUEST_TO_SPEAK" | "MANAGE_EVENTS" | "MANAGE_THREADS" | "CREATE_PUBLIC_THREADS" | "CREATE_PRIVATE_THREADS" | "USE_EXTERNAL_STICKERS" | "SEND_MESSAGES_IN_THREADS" | "USE_EMBEDDED_ACTIVITIES" | "MODERATE_MEMBERS" | "VIEW_CREATOR_MONETIZATION_ANALYTICS" | "USE_SOUNDBOARD" | "CREATE_GUILD_EXPRESSIONS" | "CREATE_EVENTS" | "USE_EXTERNAL_SOUNDS" | "SEND_VOICE_MESSAGES")[]]

    Returns ApplicationCommandBuilder<T>

  • Set the description of this command.

    Parameters

    • description: string

    Returns ApplicationCommandBuilder<T>

  • Set the description localizations for this command.

    Parameters

    • localizations: Record<string, string>

      A map of locales to localized description strings.

    Returns ApplicationCommandBuilder<T>

  • Set the name of this command.

    Parameters

    • name: string

    Returns ApplicationCommandBuilder<T>

  • Set the name localizations for this command.

    Parameters

    • localizations: Record<string, string>

      A map of locales to localized name strings.

    Returns ApplicationCommandBuilder<T>

Generated using TypeDoc