Table of Contents

Class ApplicationCommandAttribute

Namespace
NetCord.Services.ApplicationCommands
Assembly
NetCord.Services.dll
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public abstract class ApplicationCommandAttribute : Attribute
Inheritance
ApplicationCommandAttribute
Derived
Inherited Members

Properties

Contexts

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

public InteractionContextType[]? Contexts { get; init; }

Property Value

InteractionContextType[]

DMPermission

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

[Obsolete("Replaced by 'Contexts'.")]
public bool DMPermission { get; init; }

Property Value

bool

DefaultGuildUserPermissions

Default required permissions to use the command.

public Permissions DefaultGuildUserPermissions { get; init; }

Property Value

Permissions

DefaultPermission

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

[Obsolete("Replaced by 'DefaultGuildUserPermissions'.")]
public bool DefaultPermission { get; init; }

Property Value

bool

GuildId

The ID of the guild where the application command is registered.

public ulong GuildId { get; init; }

Property Value

ulong

IntegrationTypes

Installation context(s) where the command is available.

public ApplicationIntegrationType[]? IntegrationTypes { get; init; }

Property Value

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; init; }

Property Value

bool