Search Results for

    Show / Hide Table of Contents

    Class ModalInteractionAttribute

    Create a Modal interaction handler. CustomId represents the CustomId of the Modal that will be handled.

    Inheritance
    Object
    ModalInteractionAttribute
    Namespace: Discord.Interactions
    Assembly: Discord.Net.Interactions.dll
    Syntax
    public sealed class ModalInteractionAttribute : Attribute
    Remarks

    GroupAttributes will add prefixes to this command if IgnoreGroupNames is set to false CustomID supports a Wild Card pattern where you can use the WildCardExpression to match a set of CustomIDs.

    Constructors

    | Improve this Doc View Source

    ModalInteractionAttribute(String, Boolean, RunMode)

    Create a command for modal interaction handling.

    Declaration
    public ModalInteractionAttribute(string customId, bool ignoreGroupNames = false, RunMode runMode = RunMode.Default)
    Parameters
    Type Name Description
    String customId

    String to compare the modal CustomIDs with.

    Boolean ignoreGroupNames

    If true GroupAttributes will be ignored while creating this command and this method will be treated as a top level command.

    RunMode runMode

    Set the run mode of the command.

    Properties

    | Improve this Doc View Source

    CustomId

    Gets the string to compare the Modal CustomIDs with.

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

    IgnoreGroupNames

    Gets true if GroupAttributes will be ignored while creating this command and this method will be treated as a top level command.

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

    RunMode

    Gets the run mode this command gets executed with.

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

    Theme

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