Table of Contents

Class EntryPointCommandProperties

Namespace
NetCord.Rest
Assembly
NetCord.dll
public class EntryPointCommandProperties : ApplicationCommandProperties
Inheritance
EntryPointCommandProperties
Inherited Members

Constructors

EntryPointCommandProperties(string, string, EntryPointCommandHandler)

public EntryPointCommandProperties(string name, string description, EntryPointCommandHandler handler)

Parameters

name string

Name of the command (1-32 characters).

description string

Description of the command (1-100 characters).

handler EntryPointCommandHandler

Determines whether the interaction is handled by the app's interactions handler or by Discord.

Properties

Description

Description of the command (1-100 characters).

[JsonPropertyName("description")]
public string Description { get; set; }

Property Value

string

DescriptionLocalizations

Localizations of Description (1-100 characters each).

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("description_localizations")]
public IReadOnlyDictionary<string, string>? DescriptionLocalizations { get; set; }

Property Value

IReadOnlyDictionary<string, string>

Handler

Determines whether the interaction is handled by the app's interactions handler or by Discord.

[JsonPropertyName("handler")]
public EntryPointCommandHandler Handler { get; set; }

Property Value

EntryPointCommandHandler

Methods

AddContexts(params InteractionContextType[])

Interaction context(s) where the command can be used.

public EntryPointCommandProperties AddContexts(params InteractionContextType[] contexts)

Parameters

contexts InteractionContextType[]

Returns

EntryPointCommandProperties

AddContexts(IEnumerable<InteractionContextType>)

Interaction context(s) where the command can be used.

public EntryPointCommandProperties AddContexts(IEnumerable<InteractionContextType> contexts)

Parameters

contexts IEnumerable<InteractionContextType>

Returns

EntryPointCommandProperties

AddIntegrationTypes(params ApplicationIntegrationType[])

Installation context(s) where the command is available.

public EntryPointCommandProperties AddIntegrationTypes(params ApplicationIntegrationType[] integrationTypes)

Parameters

integrationTypes ApplicationIntegrationType[]

Returns

EntryPointCommandProperties

AddIntegrationTypes(IEnumerable<ApplicationIntegrationType>)

Installation context(s) where the command is available.

public EntryPointCommandProperties AddIntegrationTypes(IEnumerable<ApplicationIntegrationType> integrationTypes)

Parameters

integrationTypes IEnumerable<ApplicationIntegrationType>

Returns

EntryPointCommandProperties

WithContexts(IEnumerable<InteractionContextType>?)

Interaction context(s) where the command can be used.

public EntryPointCommandProperties WithContexts(IEnumerable<InteractionContextType>? contexts)

Parameters

contexts IEnumerable<InteractionContextType>

Returns

EntryPointCommandProperties

WithDMPermission(bool?)

Indicates whether the command is available in DMs with the app.

[Obsolete("Replaced by 'Contexts'.")]
public EntryPointCommandProperties WithDMPermission(bool? dMPermission = true)

Parameters

dMPermission bool?

Returns

EntryPointCommandProperties

WithDefaultGuildUserPermissions(Permissions?)

Default required permissions to use the command.

public EntryPointCommandProperties WithDefaultGuildUserPermissions(Permissions? defaultGuildUserPermissions)

Parameters

defaultGuildUserPermissions Permissions?

Returns

EntryPointCommandProperties

WithDefaultPermission(bool?)

Indicates whether the command is enabled by default when the app is added to a guild.

[Obsolete("Replaced by 'DefaultGuildUserPermissions'.")]
public EntryPointCommandProperties WithDefaultPermission(bool? defaultPermission = true)

Parameters

defaultPermission bool?

Returns

EntryPointCommandProperties

WithDescription(string)

Description of the command (1-100 characters).

public EntryPointCommandProperties WithDescription(string description)

Parameters

description string

Returns

EntryPointCommandProperties

WithDescriptionLocalizations(IReadOnlyDictionary<string, string>?)

Localizations of Description (1-100 characters each).

public EntryPointCommandProperties WithDescriptionLocalizations(IReadOnlyDictionary<string, string>? descriptionLocalizations)

Parameters

descriptionLocalizations IReadOnlyDictionary<string, string>

Returns

EntryPointCommandProperties

WithHandler(EntryPointCommandHandler)

Determines whether the interaction is handled by the app's interactions handler or by Discord.

public EntryPointCommandProperties WithHandler(EntryPointCommandHandler handler)

Parameters

handler EntryPointCommandHandler

Returns

EntryPointCommandProperties

WithIntegrationTypes(IEnumerable<ApplicationIntegrationType>?)

Installation context(s) where the command is available.

public EntryPointCommandProperties WithIntegrationTypes(IEnumerable<ApplicationIntegrationType>? integrationTypes)

Parameters

integrationTypes IEnumerable<ApplicationIntegrationType>

Returns

EntryPointCommandProperties

WithName(string)

Name of the command (1-32 characters).

public EntryPointCommandProperties WithName(string name)

Parameters

name string

Returns

EntryPointCommandProperties

WithNameLocalizations(IReadOnlyDictionary<string, string>?)

Localizations of Name (1-32 characters each).

public EntryPointCommandProperties WithNameLocalizations(IReadOnlyDictionary<string, string>? nameLocalizations)

Parameters

nameLocalizations IReadOnlyDictionary<string, string>

Returns

EntryPointCommandProperties

WithNsfw(bool)

Indicates whether the command is age-restricted.

public EntryPointCommandProperties WithNsfw(bool nsfw = true)

Parameters

nsfw bool

Returns

EntryPointCommandProperties