Search Results for

    Show / Hide Table of Contents

    Class DiscordApplicationCommand

    Represents a command that is registered to an application.

    Inheritance
    System.Object
    SnowflakeObject
    DiscordApplicationCommand
    Inherited Members
    SnowflakeObject.Id
    SnowflakeObject.CreationTimestamp
    Namespace: DisCatSharp.Entities
    Assembly: DisCatSharp.dll
    Syntax
    public sealed class DiscordApplicationCommand : SnowflakeObject, IEquatable<DiscordApplicationCommand>

    Constructors

    | Improve this Doc View Source

    DiscordApplicationCommand(String, String, IEnumerable<DiscordApplicationCommandOption>, ApplicationCommandType, DiscordApplicationCommandLocalization, DiscordApplicationCommandLocalization, Nullable<Permissions>, Nullable<Boolean>, Boolean)

    Creates a new instance of a DiscordApplicationCommand.

    Declaration
    public DiscordApplicationCommand(string name, string description, IEnumerable<DiscordApplicationCommandOption> options = null, ApplicationCommandType type = ApplicationCommandType.ChatInput, DiscordApplicationCommandLocalization nameLocalizations = null, DiscordApplicationCommandLocalization descriptionLocalizations = null, Permissions? defaultMemberPermissions = null, bool? dmPermission = null, bool isNsfw = false)
    Parameters
    Type Name Description
    System.String name

    The name of the command.

    System.String description

    The description of the command.

    System.Collections.Generic.IEnumerable<DiscordApplicationCommandOption> options

    Optional parameters for this command.

    ApplicationCommandType type

    The type of the command. Defaults to ChatInput.

    DiscordApplicationCommandLocalization nameLocalizations

    The localizations of the command name.

    DiscordApplicationCommandLocalization descriptionLocalizations

    The localizations of the command description.

    System.Nullable<Permissions> defaultMemberPermissions

    The default member permissions.

    System.Nullable<System.Boolean> dmPermission

    The dm permission.

    System.Boolean isNsfw

    Whether this command is NSFW.

    Properties

    | Improve this Doc View Source

    ApplicationId

    Gets the unique ID of this command's application.

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

    DefaultMemberPermissions

    Gets the commands needed permissions.

    Declaration
    public Permissions? DefaultMemberPermissions { get; }
    Property Value
    Type Description
    System.Nullable<Permissions>
    | Improve this Doc View Source

    Description

    Gets the description of this command.

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

    DescriptionLocalizations

    Gets the description localizations.

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

    DmPermission

    Gets whether the command can be used in direct messages.

    Declaration
    public bool? DmPermission { get; }
    Property Value
    Type Description
    System.Nullable<System.Boolean>
    | Improve this Doc View Source

    IsNsfw

    Gets whether the command is marked as NSFW.

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

    Name

    Gets the name of this command.

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

    NameLocalizations

    Gets the name localizations.

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

    Options

    Gets the potential parameters for this command.

    Declaration
    public IReadOnlyCollection<DiscordApplicationCommandOption> Options { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyCollection<DiscordApplicationCommandOption>
    | Improve this Doc View Source

    Type

    Gets the type of this application command.

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

    Version

    Gets the version number for this command.

    Declaration
    public ulong Version { get; }
    Property Value
    Type Description
    System.UInt64

    Methods

    | Improve this Doc View Source

    Equals(DiscordApplicationCommand)

    Checks whether this DiscordApplicationCommand object is equal to another object.

    Declaration
    public bool Equals(DiscordApplicationCommand other)
    Parameters
    Type Name Description
    DiscordApplicationCommand other

    The command to compare to.

    Returns
    Type Description
    System.Boolean

    Whether the command is equal to this DiscordApplicationCommand.

    | Improve this Doc View Source

    Equals(Object)

    Determines if a System.Object is equal to the current DiscordApplicationCommand.

    Declaration
    public override bool Equals(object other)
    Parameters
    Type Name Description
    System.Object other

    The object to compare to.

    Returns
    Type Description
    System.Boolean

    Whether the two DiscordApplicationCommand objects are not equal.

    Overrides
    System.Object.Equals(System.Object)
    | Improve this Doc View Source

    GetHashCode()

    Gets the hash code for this DiscordApplicationCommand.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32

    The hash code for this DiscordApplicationCommand.

    Overrides
    System.Object.GetHashCode()

    Operators

    | Improve this Doc View Source

    Equality(DiscordApplicationCommand, DiscordApplicationCommand)

    Determines if two DiscordApplicationCommand objects are equal.

    Declaration
    public static bool operator ==(DiscordApplicationCommand e1, DiscordApplicationCommand e2)
    Parameters
    Type Name Description
    DiscordApplicationCommand e1

    The first command object.

    DiscordApplicationCommand e2

    The second command object.

    Returns
    Type Description
    System.Boolean

    Whether the two DiscordApplicationCommand objects are equal.

    | Improve this Doc View Source

    Inequality(DiscordApplicationCommand, DiscordApplicationCommand)

    Determines if two DiscordApplicationCommand objects are not equal.

    Declaration
    public static bool operator !=(DiscordApplicationCommand e1, DiscordApplicationCommand e2)
    Parameters
    Type Name Description
    DiscordApplicationCommand e1

    The first command object.

    DiscordApplicationCommand e2

    The second command object.

    Returns
    Type Description
    System.Boolean

    Whether the two DiscordApplicationCommand objects are not equal.

    Extension Methods

    ReflectionUtilities.ToDictionary<T>(T)
    • Improve this Doc
    • View Source
    In This Article
    Back to top © 2021-2022 Aiko IT Systems