Search Results for

    Show / Hide Table of Contents

    Class SlashCommandAttribute

    Marks this method as a slash command

    Inheritance
    System.Object
    System.Attribute
    SlashCommandAttribute
    Namespace: DisCatSharp.ApplicationCommands
    Assembly: DisCatSharp.ApplicationCommands.dll
    Syntax
    [AttributeUsage(AttributeTargets.Method)]
    public class SlashCommandAttribute : Attribute

    Constructors

    | Improve this Doc View Source

    SlashCommandAttribute(String, String, Boolean)

    Marks this method as a slash command

    Declaration
    public SlashCommandAttribute(string name, string description, bool isNsfw = false)
    Parameters
    Type Name Description
    System.String name

    The name of this slash command.

    System.String description

    The description of this slash command.

    System.Boolean isNsfw

    Whether this command is marked as NSFW.

    | Improve this Doc View Source

    SlashCommandAttribute(String, String, Boolean, Boolean)

    Marks this method as a slash command

    Declaration
    public SlashCommandAttribute(string name, string description, bool dmPermission, bool isNsfw = false)
    Parameters
    Type Name Description
    System.String name

    The name of this slash command.

    System.String description

    The description of this slash command.

    System.Boolean dmPermission

    The dm permission.

    System.Boolean isNsfw

    Whether this command is marked as NSFW.

    | Improve this Doc View Source

    SlashCommandAttribute(String, String, Int64, Boolean)

    Marks this method as a slash command

    Declaration
    public SlashCommandAttribute(string name, string description, long defaultMemberPermissions, bool isNsfw = false)
    Parameters
    Type Name Description
    System.String name

    The name of this slash command.

    System.String description

    The description of this slash command.

    System.Int64 defaultMemberPermissions

    The default member permissions.

    System.Boolean isNsfw

    Whether this command is marked as NSFW.

    | Improve this Doc View Source

    SlashCommandAttribute(String, String, Int64, Boolean, Boolean)

    Marks this method as a slash command

    Declaration
    public SlashCommandAttribute(string name, string description, long defaultMemberPermissions, bool dmPermission, bool isNsfw = false)
    Parameters
    Type Name Description
    System.String name

    The name of this slash command.

    System.String description

    The description of this slash command.

    System.Int64 defaultMemberPermissions

    The default member permissions.

    System.Boolean dmPermission

    The dm permission.

    System.Boolean isNsfw

    Whether this command is marked as NSFW.

    Properties

    | Improve this Doc View Source

    DefaultMemberPermissions

    Gets the needed permission of this command

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

    Description

    Gets the description of this command

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

    DmPermission

    Gets the dm permission of this command

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

    IsNsfw

    Gets whether this command is marked as NSFW

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

    Name

    Gets the name of this command

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    System.String

    Extension Methods

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