Search Results for

    Show / Hide Table of Contents

    Interface IApplicationCommand

    The base command model that belongs to an application.

    Inherited Members
    ISnowflakeEntity.CreatedAt
    IEntity<UInt64>.Id
    IDeletable.DeleteAsync(RequestOptions)
    Namespace: Discord
    Assembly: Discord.Net.Core.dll
    Syntax
    public interface IApplicationCommand : ISnowflakeEntity, IEntity<ulong>, IDeletable

    Properties

    | Improve this Doc View Source

    ApplicationId

    Gets the unique id of the parent application.

    Declaration
    ulong ApplicationId { get; }
    Property Value
    Type Description
    UInt64
    | Improve this Doc View Source

    DefaultMemberPermissions

    Set of default GuildPermission required to invoke the command.

    Declaration
    GuildPermissions DefaultMemberPermissions { get; }
    Property Value
    Type Description
    GuildPermissions
    | Improve this Doc View Source

    Description

    Gets the description of the command.

    Declaration
    string Description { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    Name

    Gets the name of the command.

    Declaration
    string Name { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    Options

    Gets a collection of options for this application command.

    Declaration
    IReadOnlyCollection<IApplicationCommandOption> Options { get; }
    Property Value
    Type Description
    IReadOnlyCollection<IApplicationCommandOption>
    | Improve this Doc View Source

    Type

    Gets the type of the command.

    Declaration
    ApplicationCommandType Type { get; }
    Property Value
    Type Description
    ApplicationCommandType

    Methods

    | Improve this Doc View Source

    ModifyAsync(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.

    | Improve this Doc View Source

    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

    Theme

    • Improve this Doc
    • View Source
    In This Article
    Back to top Discord.Net (c) 2015-2022 3.7.2