Package dev.sympho.bot_utils.access
Interface ChannelAccessContext
- All Superinterfaces:
AccessContext
- All Known Subinterfaces:
ApplicationCommandEventContext,ButtonEventContext,ChannelEventContext,ComponentEventContext,DeferrableInteractionEventContext,InteractionEventContext,MessageBasedContext,MessageCreateEventContext,MessageEventContext,MessageIncludedContext,ModalEventContext,RepliableContext,SlashCommandEventContext
- All Known Implementing Classes:
AbstractChannelEventContext,AbstractRepliableContext
Access context that is specific to a channel.
- Since:
- 1.0
- Version:
- 1.0
- Implementation Requirements:
- A context must be effectively constant; that is, an implementation of this interface
must always return the same value on methods that return a direct value (such as
AccessContext.user()orAccessContext.guildId()). Methods that fetch remote resources (i.e. that return a Mono) may return different objects over time (as the remote object is modified), but must always reference the same entity.
-
Method Summary
-
Method Details
-
channel
Retrieves the channel.- Returns:
- The channel.
-
channelId
Retrieves the ID of the channel.- Returns:
- The channel's ID.
-
asUser
Creates a copy of this context with the user replaced by the given user.All associated values are also replaced accordingly.
- Specified by:
asUserin interfaceAccessContext- Parameters:
user- The target user.- Returns:
- The new context.
-