Interface ChannelAccessContext

All Superinterfaces:
AccessContext
All Known Subinterfaces:
CommandContext, InstrumentedContext, InteractionCommandContext, LazyContext, MessageCommandContext, SlashCommandContext
All Known Implementing Classes:
MessageContextImpl

public interface ChannelAccessContext extends AccessContext
Access context that is specific to a channel.
Since:
1.0
Version:
1.0
  • Method Details

    • getChannel

      @SideEffectFree Mono<? extends Channel> getChannel()
      Retrieves the channel.
      Returns:
      The channel.
    • getChannelId

      @Pure Snowflake getChannelId()
      Retrieves the ID of the channel.
      Returns:
      The channel's ID.
    • asUser

      default ChannelAccessContext asUser(User user)
      Creates a copy of this context with the user replaced by the given user.

      All associated values are also replaced accordingly.

      Specified by:
      asUser in interface AccessContext
      Parameters:
      user - The target user.
      Returns:
      The new context.