Skip to main content

Interface IApplicationCommand

The base command model that belongs to an application.

Assembly: Discord.Net.Core.dll​
View Source​
Declaration
public interface IApplicationCommand : ISnowflakeEntity, IEntity<ulong>, IDeletable

Properties​

ApplicationId​

Gets the unique id of the parent application.

View Source​
Declaration
ulong ApplicationId { get; }

Type​

Gets the type of the command.

View Source​
Declaration
ApplicationCommandType Type { get; }

Name​

Gets the name of the command.

View Source​
Declaration
string Name { get; }

Description​

Gets the description of the command.

View Source​
Declaration
string Description { get; }

IsDefaultPermission​

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

View Source​
Declaration
bool IsDefaultPermission { get; }

Options​

Gets a collection of options for this application command.

View Source​
Declaration
IReadOnlyCollection<IApplicationCommandOption> Options { get; }

Methods​

ModifyAsync(Action<ApplicationCommandProperties>, RequestOptions)​

Modifies the current application command.

View Source​
Declaration
Task ModifyAsync(Action<ApplicationCommandProperties> func, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task: A task that represents the asynchronous modification operation.

Parameters​
TypeNameDescription
System.Action<Discord.ApplicationCommandProperties>funcThe new properties to use when modifying the command.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

ModifyAsync<TArg>(Action<TArg>, RequestOptions)​

Modifies the current application command.

View Source​
Declaration
Task ModifyAsync<TArg>(Action<TArg> func, RequestOptions options = null)
where TArg : ApplicationCommandProperties
Returns​

System.Threading.Tasks.Task: A task that represents the asynchronous modification operation.

Parameters​
TypeNameDescription
System.Action<<TArg>>funcThe new properties to use when modifying the command.
Discord.RequestOptionsoptionsThe options to be used when sending the request.
Type Parameters​
  • TArg