Class RestExtensions
public static class RestExtensions
- Inheritance
-
RestExtensions
- Inherited Members
Methods
RespondWithModalAsync<T>(RestInteraction, string, RequestOptions, Action<ModalBuilder>)
Respond to an interaction with a IModal.
public static Task<string> RespondWithModalAsync<T>(this RestInteraction interaction, string customId, RequestOptions options = null, Action<ModalBuilder> modifyModal = null) where T : class, IModal
Parameters
interactionRestInteractionThe interaction to respond to.
customIdstringoptionsRequestOptionsThe request options for this async request.
modifyModalAction<ModalBuilder>
Returns
- Task<string>
Task representing the asynchronous modal creation operation. The task result contains the serialized payload to be used to create a HTTP response.
Type Parameters
TType of the IModal implementation.
RespondWithModalAsync<T>(RestInteraction, string, T, RequestOptions, Action<ModalBuilder>)
Respond to an interaction with an IModal.
public static Task<string> RespondWithModalAsync<T>(this RestInteraction interaction, string customId, T modalInstance, RequestOptions options = null, Action<ModalBuilder> modifyModal = null) where T : class, IModal
Parameters
interactionRestInteractionThe interaction to respond to.
customIdstringmodalInstanceTThe IModal instance to get field values from.
optionsRequestOptionsThe request options for this async request.
modifyModalAction<ModalBuilder>Delegate that can be used to modify the modal.
Returns
- Task<string>
Task representing the asynchronous modal creation operation. The task result contains the serialized payload to be used to create a HTTP response.
Type Parameters
TType of the IModal implementation.