Table of Contents

Class ApplicationCommandBuilder

Namespace
NetCord.Services.ApplicationCommands
Assembly
NetCord.Services.dll

Application commands are native ways to interact with apps in the Discord client.

public abstract class ApplicationCommandBuilder
Inheritance
ApplicationCommandBuilder
Derived
Inherited Members

Properties

Contexts

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

public IEnumerable<InteractionContextType>? Contexts { get; set; }

Property Value

IEnumerable<InteractionContextType>

DefaultGuildPermissions

Default required permissions to use the command.

public Permissions? DefaultGuildPermissions { get; set; }

Property Value

Permissions?

IntegrationTypes

Installation context(s) where the command is available.

public IEnumerable<ApplicationIntegrationType>? IntegrationTypes { get; set; }

Property Value

IEnumerable<ApplicationIntegrationType>

Name

Name of the command (1-32 characters).

public string Name { get; }

Property Value

string

Nsfw

Indicates whether the command is age-restricted.

public bool Nsfw { get; set; }

Property Value

bool

Register

Whether the application command should be registered by the service.

public bool Register { get; set; }

Property Value

bool

Methods

AddContexts(params IEnumerable<InteractionContextType>)

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

public ApplicationCommandBuilder AddContexts(params IEnumerable<InteractionContextType> contexts)

Parameters

contexts IEnumerable<InteractionContextType>

Returns

ApplicationCommandBuilder

AddIntegrationTypes(params IEnumerable<ApplicationIntegrationType>)

Installation context(s) where the command is available.

public ApplicationCommandBuilder AddIntegrationTypes(params IEnumerable<ApplicationIntegrationType> integrationTypes)

Parameters

integrationTypes IEnumerable<ApplicationIntegrationType>

Returns

ApplicationCommandBuilder

WithContexts(IEnumerable<InteractionContextType>?)

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

public ApplicationCommandBuilder WithContexts(IEnumerable<InteractionContextType>? contexts)

Parameters

contexts IEnumerable<InteractionContextType>

Returns

ApplicationCommandBuilder

WithDefaultGuildPermissions(Permissions?)

Default required permissions to use the command.

public ApplicationCommandBuilder WithDefaultGuildPermissions(Permissions? defaultGuildPermissions)

Parameters

defaultGuildPermissions Permissions?

Returns

ApplicationCommandBuilder

WithIntegrationTypes(IEnumerable<ApplicationIntegrationType>?)

Installation context(s) where the command is available.

public ApplicationCommandBuilder WithIntegrationTypes(IEnumerable<ApplicationIntegrationType>? integrationTypes)

Parameters

integrationTypes IEnumerable<ApplicationIntegrationType>

Returns

ApplicationCommandBuilder

WithNsfw(bool)

Indicates whether the command is age-restricted.

public ApplicationCommandBuilder WithNsfw(bool nsfw = true)

Parameters

nsfw bool

Returns

ApplicationCommandBuilder

WithRegister(bool)

Whether the application command should be registered by the service.

public ApplicationCommandBuilder WithRegister(bool register = true)

Parameters

register bool

Returns

ApplicationCommandBuilder