Interface IApplicationCommand
The base command model that belongs to an application.
Inherited Members
Namespace: Discord
Assembly: Discord.Net.Core.dll
Syntax
public interface IApplicationCommand : ISnowflakeEntity, IEntity<ulong>, IDeletable
Properties
| Improve this Doc View SourceApplicationId
Gets the unique id of the parent application.
Declaration
ulong ApplicationId { get; }
Property Value
Type | Description |
---|---|
UInt64 |
DefaultMemberPermissions
Set of default GuildPermission required to invoke the command.
Declaration
GuildPermissions DefaultMemberPermissions { get; }
Property Value
Type | Description |
---|---|
GuildPermissions |
Description
Gets the description of the command.
Declaration
string Description { get; }
Property Value
Type | Description |
---|---|
String |
DescriptionLocalizations
Gets the localization dictionary for the description field of this command.
Declaration
IReadOnlyDictionary<string, string> DescriptionLocalizations { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<String, String> |
DescriptionLocalized
Gets the localized description of this command.
Declaration
string DescriptionLocalized { get; }
Property Value
Type | Description |
---|---|
String |
Remarks
Only returned when the withLocalizations
query parameter is set to false when requesting the command.
IsDefaultPermission
Gets whether the command is enabled by default when the app is added to a guild.
Declaration
bool IsDefaultPermission { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsEnabledInDm
Indicates whether the command is available in DMs with the app.
Declaration
bool IsEnabledInDm { get; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Only for globally-scoped commands.
IsNsfw
Indicates whether the command is age restricted.
Declaration
bool IsNsfw { get; }
Property Value
Type | Description |
---|---|
Boolean |
Name
Gets the name of the command.
Declaration
string Name { get; }
Property Value
Type | Description |
---|---|
String |
NameLocalizations
Gets the localization dictionary for the name field of this command.
Declaration
IReadOnlyDictionary<string, string> NameLocalizations { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<String, String> |
NameLocalized
Gets the localized name of this command.
Declaration
string NameLocalized { get; }
Property Value
Type | Description |
---|---|
String |
Remarks
Only returned when the withLocalizations
query parameter is set to false when requesting the command.
Options
Gets a collection of options for this application command.
Declaration
IReadOnlyCollection<IApplicationCommandOption> Options { get; }
Property Value
Type | Description |
---|---|
IReadOnlyCollection<IApplicationCommandOption> |
Type
Gets the type of the command.
Declaration
ApplicationCommandType Type { get; }
Property Value
Type | Description |
---|---|
ApplicationCommandType |
Methods
| Improve this Doc View SourceModifyAsync(Action<ApplicationCommandProperties>, RequestOptions)
Modifies the current application command.
Declaration
Task ModifyAsync(Action<ApplicationCommandProperties> func, RequestOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
Action<ApplicationCommandProperties> | func | The new properties to use when modifying the command. |
RequestOptions | options | The options to be used when sending the request. |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous modification operation. |
ModifyAsync<TArg>(Action<TArg>, RequestOptions)
Modifies the current application command.
Declaration
Task ModifyAsync<TArg>(Action<TArg> func, RequestOptions options = null)
where TArg : ApplicationCommandProperties
Parameters
Type | Name | Description |
---|---|---|
Action<TArg> | func | The new properties to use when modifying the command. |
RequestOptions | options | The options to be used when sending the request. |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous modification operation. |
Type Parameters
Name | Description |
---|---|
TArg |