Search Results for

    Show / Hide Table of Contents

    Class IDiscordInteractionExtentions

    Inheritance
    Object
    IDiscordInteractionExtentions
    Namespace: Discord.Interactions
    Assembly: Discord.Net.Interactions.dll
    Syntax
    public static class IDiscordInteractionExtentions : object

    Methods

    | Improve this Doc View Source

    RespondWithModalAsync<T>(IDiscordInteraction, String, InteractionService, RequestOptions, Action<ModalBuilder>)

    Respond to an interaction with a IModal.

    Declaration
    public static async Task RespondWithModalAsync<T>(this IDiscordInteraction interaction, string customId, InteractionService interactionService, RequestOptions options = null, Action<ModalBuilder> modifyModal = null)
        where T : class, IModal
    Parameters
    Type Name Description
    IDiscordInteraction interaction

    The interaction to respond to.

    String customId
    InteractionService interactionService

    Interaction service instance that should be used to build ModalInfos.

    RequestOptions options

    The request options for this async request.

    Action<ModalBuilder> modifyModal

    Delegate that can be used to modify the modal.

    Returns
    Type Description
    Task
    Type Parameters
    Name Description
    T

    Type of the IModal implementation.

    Remarks

    This method overload uses the interactionService parameter to create a new ModalInfo if there isn't a built one already in cache.

    | Improve this Doc View Source

    RespondWithModalAsync<T>(IDiscordInteraction, String, RequestOptions, Action<ModalBuilder>)

    Respond to an interaction with a IModal.

    Declaration
    public static async Task RespondWithModalAsync<T>(this IDiscordInteraction interaction, string customId, RequestOptions options = null, Action<ModalBuilder> modifyModal = null)
        where T : class, IModal
    Parameters
    Type Name Description
    IDiscordInteraction interaction

    The interaction to respond to.

    String customId
    RequestOptions options

    The request options for this async request.

    Action<ModalBuilder> modifyModal

    Delegate that can be used to modify the modal.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation of responding to the interaction.

    Type Parameters
    Name Description
    T

    Type of the IModal implementation.

    Theme

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