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 |
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.
Name
Gets the name of the command.
Declaration
string Name { get; }
Property Value
Type | Description |
---|---|
String |
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 |