Package dev.sympho.bot_utils.event
Interface InteractionEventContext
- All Superinterfaces:
AccessContext,AccessValidator,ChannelAccessContext,ChannelAccessValidator,ChannelEventContext,EventContext
- All Known Subinterfaces:
ApplicationCommandEventContext,ButtonEventContext,ComponentEventContext,DeferrableInteractionEventContext,ModalEventContext,SlashCommandEventContext
The context of an interaction-based event.
- 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.guild()Retrieves the guild, if there is one.guildId()Retrieves the ID of the guild, if there is one.default InteractionRetrieves the interaction associated with the event.member()Retrieves the user as a guild member.Retrieves the user as a guild member of the given guild.default Useruser()Retrieves the user.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, validate
-
Method Details
-
event
InteractionCreateEvent event()Description copied from interface:EventContextRetrieves the triggering event.- Specified by:
eventin interfaceEventContext- Returns:
- The event.
-
interaction
Retrieves the interaction associated with the event.- Returns:
- The interaction.
-
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.
-
user
Description copied from interface:AccessContextRetrieves the user.- Specified by:
userin interfaceAccessContext- Returns:
- The user.
-
member
Description copied from interface:AccessContextRetrieves the user as a guild member.- Specified by:
memberin interfaceAccessContext- Returns:
- The calling user as a guild member. May be empty if the context is a private channel.
-
member
Description copied from interface:AccessContextRetrieves the user as a guild member of the given guild.- Specified by:
memberin interfaceAccessContext- Parameters:
guildId- The ID of the target guild.- Returns:
- The user as a guild member of the given guild.
-
channel
Description copied from interface:ChannelAccessContextRetrieves the channel.- Specified by:
channelin interfaceChannelAccessContext- Returns:
- The channel.
-
channelId
Description copied from interface:ChannelAccessContextRetrieves the ID of the channel.- Specified by:
channelIdin interfaceChannelAccessContext- Returns:
- The channel's ID.
-