Package dev.sympho.bot_utils.event
Interface MessageBasedContext
- All Superinterfaces:
AccessContext,AccessValidator,ChannelAccessContext,ChannelAccessValidator,ChannelEventContext,EventContext
- All Known Subinterfaces:
ButtonEventContext,ComponentEventContext,MessageCreateEventContext,MessageEventContext,MessageIncludedContext,ModalEventContext
The context of an event that is related to a message.
- Since:
- 1.0
- Version:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionMono<? extends MessageChannel>channel()Retrieves the channel.Retrieves the message that the event originates from.message()Retrieves the message that the event originates from, as attached to the event.Retrieves the ID of the message that the event originates from.Methods inherited from interface dev.sympho.bot_utils.access.AccessContext
asGuild, guild, guildId, isPrivate, member, member, userMethods inherited from interface dev.sympho.bot_utils.access.ChannelAccessContext
asUser, channelIdMethods 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, event, validate
-
Method Details
-
fetchMessage
Retrieves the message that the event originates from. -
message
Retrieves the message that the event originates from, as attached to the event.- Returns:
- The message, or
nullif the message data is not attached to the received event. - See Also:
- Implementation Requirements:
- This method always returns the message that was included in the event.
-
messageId
Retrieves the ID of the message that the event originates from.- Returns:
- The message ID.
-
channel
Mono<? extends MessageChannel> channel()Description copied from interface:ChannelAccessContextRetrieves the channel.- Specified by:
channelin interfaceChannelAccessContext- Returns:
- The channel.
-