Search Results for

    Show / Hide Table of Contents

    Class SocketApplicationCommand

    Represents a Websocket-based IApplicationCommand.

    Inheritance
    Object
    SocketEntity<UInt64>
    SocketApplicationCommand
    Implements
    IEntity<UInt64>
    IApplicationCommand
    ISnowflakeEntity
    IEntity<UInt64>
    IDeletable
    Inherited Members
    SocketEntity<UInt64>.Id
    Namespace: Discord.WebSocket
    Assembly: Discord.Net.WebSocket.dll
    Syntax
    public class SocketApplicationCommand : SocketEntity<ulong>, IEntity<ulong>, IApplicationCommand, ISnowflakeEntity, IEntity<ulong>, IDeletable

    Properties

    | Improve this Doc View Source

    ApplicationId

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

    CreatedAt

    Declaration
    public DateTimeOffset CreatedAt { get; }
    Property Value
    Type Description
    DateTimeOffset
    | Improve this Doc View Source

    DefaultMemberPermissions

    Set of default GuildPermission required to invoke the command.

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

    Description

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

    DescriptionLocalizations

    Gets the localization dictionary for the description field of this command.

    Declaration
    public IReadOnlyDictionary<string, string> DescriptionLocalizations { get; }
    Property Value
    Type Description
    IReadOnlyDictionary<String, String>
    | Improve this Doc View Source

    DescriptionLocalized

    Gets the localized description of this command.

    Declaration
    public string DescriptionLocalized { get; }
    Property Value
    Type Description
    String
    Remarks

    Only returned when the withLocalizations query parameter is set to false when requesting the command.

    | Improve this Doc View Source

    Guild

    Gets the guild this command resides in; if this command is a global command then it will return null

    Declaration
    public SocketGuild Guild { get; }
    Property Value
    Type Description
    SocketGuild
    | Improve this Doc View Source

    IsDefaultPermission

    Declaration
    public bool IsDefaultPermission { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsEnabledInDm

    Declaration
    public bool IsEnabledInDm { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsGlobalCommand

    Gets whether or not this command is a global application command.

    Declaration
    public bool IsGlobalCommand { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsNsfw

    Declaration
    public bool IsNsfw { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    Name

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

    NameLocalizations

    Gets the localization dictionary for the name field of this command.

    Declaration
    public IReadOnlyDictionary<string, string> NameLocalizations { get; }
    Property Value
    Type Description
    IReadOnlyDictionary<String, String>
    | Improve this Doc View Source

    NameLocalized

    Gets the localized name of this command.

    Declaration
    public string NameLocalized { get; }
    Property Value
    Type Description
    String
    Remarks

    Only returned when the withLocalizations query parameter is set to false when requesting the command.

    | Improve this Doc View Source

    Options

    Gets a collection of SocketApplicationCommandOptions for this command.

    Declaration
    public IReadOnlyCollection<SocketApplicationCommandOption> Options { get; }
    Property Value
    Type Description
    IReadOnlyCollection<SocketApplicationCommandOption>
    Remarks

    If the Type is not a slash command, this field will be an empty collection.

    | Improve this Doc View Source

    Type

    Gets the type of the command.

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

    Methods

    | Improve this Doc View Source

    DeleteAsync(RequestOptions)

    Declaration
    public Task DeleteAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options
    Returns
    Type Description
    Task
    | Improve this Doc View Source

    ModifyAsync(Action<ApplicationCommandProperties>, RequestOptions)

    Declaration
    public Task ModifyAsync(Action<ApplicationCommandProperties> func, RequestOptions options = null)
    Parameters
    Type Name Description
    Action<ApplicationCommandProperties> func
    RequestOptions options
    Returns
    Type Description
    Task
    | Improve this Doc View Source

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

    Declaration
    public async Task ModifyAsync<TArg>(Action<TArg> func, RequestOptions options = null)
        where TArg : ApplicationCommandProperties
    Parameters
    Type Name Description
    Action<TArg> func
    RequestOptions options
    Returns
    Type Description
    Task
    Type Parameters
    Name Description
    TArg

    Implements

    IEntity<TId>
    IApplicationCommand
    ISnowflakeEntity
    IEntity<TId>
    IDeletable

    Theme

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