Package dev.sympho.bot_utils.event
Interface MessageCreateEventContext
- All Superinterfaces:
AccessContext,AccessValidator,ChannelAccessContext,ChannelAccessValidator,ChannelEventContext,EventContext,MessageBasedContext,MessageEventContext,MessageIncludedContext
The context of a new message being created.
- Since:
- 1.0
- Version:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault Mono<MessageChannel>channel()Retrieves the channel.default SnowflakeRetrieves the ID of the channel.event()Retrieves the triggering event.Retrieves the message that the event originates from.guild()Retrieves the guild, if there is one.guildId()Retrieves the ID of the guild, if there is one.default Messagemessage()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.default Useruser()Retrieves the user.Methods inherited from interface dev.sympho.bot_utils.access.AccessContext
asGuild, isPrivate, member, memberMethods 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, validate
-
Method Details
-
event
MessageCreateEvent event()Description copied from interface:EventContextRetrieves the triggering event.- Specified by:
eventin interfaceEventContext- Specified by:
eventin interfaceMessageEventContext- 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- Specified by:
messagein interfaceMessageIncludedContext- Returns:
- The message, or
nullif the message data is not attached to the received event. - See Also:
-
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.
-
user
Description copied from interface:AccessContextRetrieves the user.- Specified by:
userin interfaceAccessContext- Returns:
- The user.
-
guild
Description copied from interface:AccessContextRetrieves the guild, if there is one.- Specified by:
guildin interfaceAccessContext- Returns:
- The invoking guild.
-
guildId
Description copied from interface:AccessContextRetrieves the ID of the guild, if there is one.- Specified by:
guildIdin interfaceAccessContext- Returns:
- The guild's ID, or
nullif a private channel.
-
channelId
Description copied from interface:ChannelAccessContextRetrieves the ID of the channel.- Specified by:
channelIdin interfaceChannelAccessContext- Returns:
- The channel's ID.
-
channel
Description copied from interface:ChannelAccessContextRetrieves the channel.- Specified by:
channelin interfaceChannelAccessContext- Specified by:
channelin interfaceMessageBasedContext- Returns:
- The channel.
-