Search Results for

    Show / Hide Table of Contents

    Class SlashCommandInfo

    Contains all the information about a slash command.

    Inheritance
    Object
    SlashCommandInfo
    Implements
    ISlashCommandInfo
    Inherited Members
    System.Object.Equals(System.Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Object.ToString()
    Namespace: Color_Chan.Discord.Commands.Models.Info
    Assembly: Color-Chan.Discord.Commands.dll
    Syntax
    public class SlashCommandInfo : ISlashCommandInfo

    Constructors

    | Improve this Doc View Source

    SlashCommandInfo(String, String, Boolean, MethodInfo, TypeInfo, Boolean)

    Initializes a new instance of SlashCommandInfo.

    Declaration
    public SlashCommandInfo(string name, string description, bool defaultPermission, MethodInfo command, TypeInfo module, bool acknowledge = false)
    Parameters
    Type Name Description
    String name

    The name of the command.

    String description

    The description of the command.

    Boolean defaultPermission

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

    System.Reflection.MethodInfo command

    The System.Reflection.MethodInfo containing the method of the command.

    System.Reflection.TypeInfo module

    The command module containing the CommandMethod.

    Boolean acknowledge

    Whether or not the command should be automatically acknowledge to prevent the token from turning inactive after 3 seconds.

    | Improve this Doc View Source

    SlashCommandInfo(String, String, Boolean, TypeInfo)

    Initializes a new instance of SlashCommandInfo.

    Declaration
    public SlashCommandInfo(string name, string description, bool defaultPermission, TypeInfo module)
    Parameters
    Type Name Description
    String name

    The name of the command.

    String description

    The description of the command.

    Boolean defaultPermission

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

    System.Reflection.TypeInfo module

    The command module containing the CommandMethod.

    Properties

    | Improve this Doc View Source

    Acknowledge

    Whether or not the command should be automatically acknowledge to prevent the token from turning inactive after 3 seconds.

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

    CommandMethod

    The System.Reflection.MethodInfo containing the method of the command.

    Declaration
    public MethodInfo CommandMethod { get; set; }
    Property Value
    Type Description
    System.Reflection.MethodInfo
    Remarks

    null when the command is a command group.

    | Improve this Doc View Source

    CommandName

    The name of the command.

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

    CommandOptions

    The options for the slash command.

    Declaration
    public List<ISlashCommandOptionInfo> CommandOptions { get; set; }
    Property Value
    Type Description
    List<ISlashCommandOptionInfo>
    | Improve this Doc View Source

    DefaultPermission

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

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

    Description

    The description of the command.

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

    Guilds

    A System.Collections.Generic.IEnumerable<T> of SlashCommandGuildAttribute containing the IDs of the guilds that will get access to this slash command.

    Declaration
    public IEnumerable<SlashCommandGuildAttribute> Guilds { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<SlashCommandGuildAttribute>
    | Improve this Doc View Source

    ParentModule

    The command module containing the CommandMethod.

    Declaration
    public TypeInfo ParentModule { get; set; }
    Property Value
    Type Description
    System.Reflection.TypeInfo
    | Improve this Doc View Source

    Requirements

    A System.Collections.Generic.IEnumerable<T> of InteractionRequirementAttributes containing all the requirements to execute the command.

    Declaration
    public IEnumerable<InteractionRequirementAttribute> Requirements { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<InteractionRequirementAttribute>

    Implements

    ISlashCommandInfo
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX