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
interaction
RestInteractionThe interaction to respond to.
customId
stringoptions
RequestOptionsThe request options for this async request.
modifyModal
Action<ModalBuilder>
Returns
- string
Serialized payload to be used to create a HTTP response.
Type Parameters
T
Type 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
interaction
RestInteractionThe interaction to respond to.
customId
stringmodal
TThe IModal instance to get field values from.
options
RequestOptionsThe request options for this async request.
modifyModal
Action<ModalBuilder>Delegate that can be used to modify the modal.
Returns
- string
Serialized payload to be used to create a HTTP response.
Type Parameters
T
Type of the IModal implementation.