Search Results for

    Show / Hide Table of Contents

    Class ContextMenuAttribute

    Marks this method as a context menu.

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

    Constructors

    | Improve this Doc View Source

    ContextMenuAttribute(ApplicationCommandType, String, Boolean)

    Marks this method as a context menu.

    Declaration
    public ContextMenuAttribute(ApplicationCommandType type, string name, bool isNsfw = false)
    Parameters
    Type Name Description
    ApplicationCommandType type

    The type of the context menu.

    System.String name

    The name of the context menu.

    System.Boolean isNsfw

    Whether this context menu command is marked as NSFW.

    | Improve this Doc View Source

    ContextMenuAttribute(ApplicationCommandType, String, Int64, Boolean)

    Marks this method as a context menu.

    Declaration
    public ContextMenuAttribute(ApplicationCommandType type, string name, long defaultMemberPermissions, bool isNsfw = false)
    Parameters
    Type Name Description
    ApplicationCommandType type

    The type of the context menu.

    System.String name

    The name of the context menu.

    System.Int64 defaultMemberPermissions

    The default member permissions.

    System.Boolean isNsfw

    Whether this context menu command is marked as NSFW.

    Properties

    | 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

    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 context menu.

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

    Type

    Gets the type of this context menu.

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

    Extension Methods

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