Table of Contents

Interface IModalInteraction

Namespace
Discord
Assembly
Discord.Net.Core.dll

Represents an interaction type for Modals.

public interface IModalInteraction : IDiscordInteraction, ISnowflakeEntity, IEntity<ulong>
Inherited Members
Extension Methods

Properties

Data

Gets the data received with this interaction; contains the clicked button.

IModalInteractionData Data { get; }

Property Value

IModalInteractionData

Message

Gets the message the modal originates from.

IUserMessage Message { get; }

Property Value

IUserMessage

Remarks

This property is only populated if the modal was created from a message component.

Methods

DeferLoadingAsync(bool, RequestOptions)

Defers an interaction with the response type 5 (DeferredChannelMessageWithSource).

Task DeferLoadingAsync(bool ephemeral = false, RequestOptions options = null)

Parameters

ephemeral bool

true to defer ephemerally, otherwise false.

options RequestOptions

The options to be used when sending the request.

Returns

Task

A task that represents the asynchronous operation of acknowledging the interaction.

UpdateAsync(Action<MessageProperties>, RequestOptions)

Updates the message which this modal originates from with the type UpdateMessage

Task UpdateAsync(Action<MessageProperties> func, RequestOptions options = null)

Parameters

func Action<MessageProperties>

A delegate containing the properties to modify the message with.

options RequestOptions

The options to be used when sending the request.

Returns

Task

A task that represents the asynchronous operation of updating the message.

Remarks

This method can be used only if the modal was created from a message component.