/// <param name="cancellationToken">Token for canceling the wait operation.</param>
/// <returns>
/// A Task representing the asyncronous waiting operation with a <see cref="bool"/> result,
/// the result is <see langword="false"/> if the user declined the prompt or didnt answer in time, <see langword="true"/> if the user confirmed the prompt.
var response = await WaitForMessageComponentAsync(interaction.Discord, prompt, timeout, cancellationToken).ConfigureAwait(false);
if(updateMessage is not null)
await response.UpdateAsync(updateMessage);
return response is not null && response.Data.CustomId == confirmId;
}
/// <summary>
/// Responds to an interaction with a modal and asyncronously wait for the users response.
/// </summary>
/// <typeparam name="TModal">The type of <see cref="IModal"/> to respond with.</typeparam>
/// <param name="interaction">The interaction to respond to.</param>
/// <param name="timeout">Timeout duration of this operation.</param>
/// <param name="contextFactory">Delegate for creating <see cref="IInteractionContext"/>s to be passed on to the <see cref="ComponentTypeConverter"/>s.</param>
/// <param name="services">Service collection to be passed on to the <see cref="ComponentTypeConverter"/>s.</param>
/// <param name="cancellationToken">Token for canceling the wait operation.</param>
/// <returns>
/// A Task representing the asyncronous waiting operation with a <typeparamref name="TModal"/> result,
/// the result is <see langword="null"/>q if the process timed out before receiving a valid Interaction.
/// </returns>
public static async Task<TModal> SendModalAsync<TModal>(this SocketInteraction interaction, TimeSpan timeout,
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.