Class DiscordApplicationCommand
- Namespace
- DSharpPlus.Entities
- Assembly
- DSharpPlus.dll
Represents a command that is registered to an application.
public sealed class DiscordApplicationCommand : SnowflakeObject
- Inheritance
-
objectDiscordApplicationCommand
- Inherited Members
Constructors
- DiscordApplicationCommand(string, string, IEnumerable<DiscordApplicationCommandOption>, bool?, DiscordApplicationCommandType, IReadOnlyDictionary<string, string>, IReadOnlyDictionary<string, string>, bool?, DiscordPermissions?, bool?, IReadOnlyList<DiscordInteractionContextType>?, IReadOnlyList<DiscordApplicationIntegrationType>?)
Creates a new instance of a DiscordApplicationCommand.
Properties
- AllowDMUsage
Whether this command can be invoked in DMs.
- ApplicationId
Gets the unique ID of this command's application.
- Contexts
Contexts in which this command can be invoked.
- DefaultMemberPermissions
What permissions this command requires to be invoked.
- DefaultPermission
Gets whether the command is enabled by default when the application is added to a guild.
- Description
Gets the description of this command.
- DescriptionLocalizations
Gets the localization dictionary for the Description field.
- IntegrationTypes
Contexts in which this command can be installed.
- Mention
Gets the command's mention string.
- NSFW
Whether this command is age-restricted.
- Name
Gets the name of this command.
- NameLocalizations
Gets the localization dictionary for the Name field.
- Options
Gets the potential parameters for this command.
- Type
Gets the type of this application command.
- Version
Gets the auto-incrementing version number for this command.
Methods
- Equals(DiscordApplicationCommand)
Checks whether this DiscordApplicationCommand object is equal to another object.
- Equals(object)
Determines if a object is equal to the current DiscordApplicationCommand.
- GetHashCode()
Gets the hash code for this DiscordApplicationCommand.
- GetSubcommandMention(params string[])
Creates a mention for a subcommand.
- WeakEquals(DiscordApplicationCommand)
Implements a weak-equality check for application commands, treating null and default values the same and only comparing fields known locally.
Operators
- operator ==(DiscordApplicationCommand, DiscordApplicationCommand)
Determines if two DiscordApplicationCommand objects are equal.
- operator !=(DiscordApplicationCommand, DiscordApplicationCommand)
Determines if two DiscordApplicationCommand objects are not equal.