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
DMPermission
Indicates whether the command is available in DMs with the app.
[Obsolete("Replaced by 'Contexts'.")]
public bool DMPermission { get; init; }
Property Value
DefaultGuildUserPermissions
Default required permissions to use the command.
public Permissions DefaultGuildUserPermissions { get; init; }
Property Value
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
GuildId
The ID of the guild where the application command is registered.
public ulong GuildId { get; init; }
Property Value
IntegrationTypes
Installation context(s) where the command is available.
public ApplicationIntegrationType[]? IntegrationTypes { get; init; }
Property Value
Name
Name of the command (1-32 characters).
public string Name { get; }
Property Value
Nsfw
Indicates whether the command is age-restricted.
public bool Nsfw { get; init; }