Package dev.sympho.bot_utils.event
Interface ComponentEventContext
- All Superinterfaces:
AccessContext,AccessValidator,ChannelAccessContext,ChannelAccessValidator,ChannelEventContext,DeferrableInteractionEventContext,EventContext,InteractionEventContext,MessageBasedContext,RepliableContext
- All Known Subinterfaces:
ButtonEventContext,ModalEventContext
public interface ComponentEventContext
extends DeferrableInteractionEventContext, MessageBasedContext
The context of an event fired by interacting with a message component.
- Since:
- 1.0
- Version:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault Mono<MessageChannel>channel()Retrieves the channel.event()Retrieves the triggering event.Retrieves the message that the event originates from.message()Retrieves the message that the event originates from, as attached to the event.default SnowflakeRetrieves the ID of the message that the event originates from.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.EventContext
client, validateMethods inherited from interface dev.sympho.bot_utils.event.InteractionEventContext
channelId, guild, guildId, interaction, member, member, user
-
Method Details
-
event
ComponentInteractionEvent event()Description copied from interface:EventContextRetrieves the triggering event.- Specified by:
eventin interfaceDeferrableInteractionEventContext- Specified by:
eventin interfaceEventContext- Specified by:
eventin interfaceInteractionEventContext- Returns:
- The event.
-
message
Description copied from interface:MessageBasedContextRetrieves the message that the event originates from, as attached to the event.- Specified by:
messagein interfaceMessageBasedContext- Returns:
- The message, or
nullif the message is ephemeral. - See Also:
- API Note:
- If the message is ephemeral, only
the IDwill be present.
-
fetchMessage
Description copied from interface:MessageBasedContextRetrieves the message that the event originates from.- Specified by:
fetchMessagein interfaceMessageBasedContext- Returns:
- The message, or an empty mono if the message cannot be retrieved.
- See Also:
-
messageId
Description copied from interface:MessageBasedContextRetrieves the ID of the message that the event originates from.- Specified by:
messageIdin interfaceMessageBasedContext- Returns:
- The message ID.
-
channel
Description copied from interface:ChannelAccessContextRetrieves the channel.- Specified by:
channelin interfaceChannelAccessContext- Specified by:
channelin interfaceInteractionEventContext- Specified by:
channelin interfaceMessageBasedContext- Returns:
- The channel.
-