Package dev.sympho.bot_utils.event
Interface ModalEventContext
- All Superinterfaces:
AccessContext,AccessValidator,ChannelAccessContext,ChannelAccessValidator,ChannelEventContext,ComponentEventContext,DeferrableInteractionEventContext,EventContext,InteractionEventContext,MessageBasedContext,RepliableContext
The context of a modal component being submitted by a user.
- Since:
- 1.0
- Version:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionevent()Retrieves the triggering event.Retrieves the input field with the given custom ID.Retrieves the input fields in this context.Methods inherited from interface dev.sympho.bot_utils.access.AccessContext
asGuild, isPrivateMethods inherited from interface dev.sympho.bot_utils.access.ChannelAccessContext
asUserMethods inherited from interface dev.sympho.bot_utils.event.ChannelEventContext
belongs, belongs, belongs, belongs, hasAccess, hasAccess, validate, validatorMethods inherited from interface dev.sympho.bot_utils.event.ComponentEventContext
channel, fetchMessage, message, messageIdMethods inherited from interface dev.sympho.bot_utils.event.EventContext
client, validateMethods inherited from interface dev.sympho.bot_utils.event.InteractionEventContext
channelId, guild, guildId, interaction, member, member, user
-
Method Details
-
event
ModalSubmitInteractionEvent event()Description copied from interface:EventContextRetrieves the triggering event.- Specified by:
eventin interfaceComponentEventContext- Specified by:
eventin interfaceDeferrableInteractionEventContext- Specified by:
eventin interfaceEventContext- Specified by:
eventin interfaceInteractionEventContext- Returns:
- The event.
-
getField
Retrieves the input field with the given custom ID.- Parameters:
fieldId- The custom ID.- Returns:
- The input field with that ID.
- Throws:
IllegalArgumentException- if there is no field in this context with that ID.
-
getFields
Collection<TextInput> getFields()Retrieves the input fields in this context.- Returns:
- The input fields.
-