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, user
Methods inherited from interface dev.sympho.bot_utils.access.ChannelAccessContext
asUser, channelId
Methods inherited from interface dev.sympho.bot_utils.event.ChannelEventContext
belongs, belongs, belongs, belongs, hasAccess, hasAccess, validate, validator
Methods 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
null
if 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:ChannelAccessContext
Retrieves the channel.- Specified by:
channel
in interfaceChannelAccessContext
- Returns:
- The channel.
-