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
customIdstringThe custom id of the modal to wait for.
timeoutOverrideTimeSpan?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
customIdstringThe custom id of the modal to wait for.
tokenCancellationTokenA custom cancellation token that can be cancelled at any point.
Returns
- Task<InteractivityResult<ComponentInteractionCreateEventArgs>>
A InteractivityResult<T> with the result of the modal.