Class RestExtensions
public static class RestExtensions
- Inheritance
-
RestExtensions
- Inherited Members
Methods
RespondWithModal<T>(RestInteraction, string, RequestOptions, Action<ModalBuilder>)
Respond to an interaction with a IModal.
public static string RespondWithModal<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
- string
Serialized payload to be used to create a HTTP response.
Type Parameters
TType of the IModal implementation.
RespondWithModal<T>(RestInteraction, string, T, RequestOptions, Action<ModalBuilder>)
Respond to an interaction with an IModal.
public static string RespondWithModal<T>(this RestInteraction interaction, string customId, T modal, RequestOptions options = null, Action<ModalBuilder> modifyModal = null) where T : class, IModal
Parameters
interactionRestInteractionThe interaction to respond to.
customIdstringmodalTThe 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
- string
Serialized payload to be used to create a HTTP response.
Type Parameters
TType of the IModal implementation.