Table of Contents
API reference

Method WaitForModalAsync

Namespace
DisCatSharp.Interactivity
Assembly
DisCatSharp.Interactivity.dll

WaitForModalAsync(string, TimeSpan?)

Waits for a user modal submit.

public Task<InteractivityResult<ComponentInteractionCreateEventArgs>> WaitForModalAsync(string customId, TimeSpan? timeoutOverride = null)

Parameters

customId string

The custom id of the modal to wait for.

timeoutOverride TimeSpan?

Override the timeout period specified in InteractivityConfiguration.

Returns

Task<InteractivityResult<ComponentInteractionCreateEventArgs>>

A InteractivityResult<T> with the result of the modal.

WaitForModalAsync(string, CancellationToken)

Waits for a user modal submit.

public Task<InteractivityResult<ComponentInteractionCreateEventArgs>> WaitForModalAsync(string customId, CancellationToken token)

Parameters

customId string

The custom id of the modal to wait for.

token CancellationToken

A custom cancellation token that can be cancelled at any point.

Returns

Task<InteractivityResult<ComponentInteractionCreateEventArgs>>

A InteractivityResult<T> with the result of the modal.