class ContextMenuCommandBuilder

export declare class ContextMenuCommandBuilder

readonly
default_member_permissions : Permissions | null | undefined

Set of permissions represented as a bit set for the command

deprecatedreadonly
default_permission : boolean | undefined

Whether the command is enabled by default when the app is added to a guild

readonly
dm_permission : boolean | undefined

Indicates whether the command is available in DMs with the application, only for globally-scoped commands. By default, commands are visible.

readonlyoptional
name_localizations? : LocalizationMap

The localized names for this command

readonly
name : string

The name of this context menu command

readonly
type : ContextMenuCommandType

The type of this context menu command

setDefaultMemberPermissions(
permissions: Permissions | bigint | number | null | undefined
) : this

Sets the default permissions a member should have in order to run the command.

See also: https://discord.com/developers/docs/interactions/application-commands#permissions

deprecated
setDefaultPermission(
value: boolean
) : this

Sets whether the command is enabled by default when the application is added to a guild.

See also: https://discord.com/developers/docs/interactions/application-commands#permissions

setDMPermission(
enabled: boolean | null | undefined
) : this

Sets if the command is available in DMs with the application, only for globally-scoped commands. By default, commands are visible.

See also: https://discord.com/developers/docs/interactions/application-commands#permissions

setName(
name: string
) : this

Sets the name

setNameLocalization(
locale: LocaleString
localizedName: string | null
) : this

Sets a name localization

setNameLocalizations(
localizedNames: LocalizationMap | null
) : this

Sets the name localizations

setType() : this

Sets the type

Returns the final data that should be sent to Discord.