Class StageChannel

java.lang.Object
discord4j.core.object.entity.channel.StageChannel
All Implemented Interfaces:
DiscordObject, AudioChannel, CategorizableChannel, Channel, GuildChannel, TopLevelGuildChannel, Entity

public final class StageChannel extends Object implements AudioChannel, CategorizableChannel
A Discord stage channel.
  • Constructor Details

    • StageChannel

      public StageChannel(GatewayDiscordClient gateway, discord4j.discordjson.json.ChannelData data)
      Constructs a StageChannel with an associated GatewayDiscordClient and Discord data.
      Parameters:
      gateway - The GatewayDiscordClient associated to this object, must be non-null.
      data - The raw data as represented by Discord, must be non-null.
  • Method Details

    • edit

      public discord4j.core.spec.StageChannelEditMono edit()
      Requests to edit this stage channel. Properties specifying how to edit this stage channel can be set via the withXxx methods of the returned StageChannelEditMono.
      Returns:
      A StageChannelEditMono where, upon successful completion, emits the edited StageChannel. If an error is received, it is emitted through the StageChannelEditMono.
    • edit

      public Mono<StageChannel> edit(discord4j.core.spec.StageChannelEditSpec spec)
      Requests to edit this stage channel.
      Parameters:
      spec - an immutable object that specifies how to edit this stage channel
      Returns:
      A Mono where, upon successful completion, emits the edited StageChannel. If an error is received, it is emitted through the Mono.
    • isSpeaker

      public Mono<Boolean> isSpeaker(Snowflake memberId)
      Requests to determine if the member represented by the provided Snowflake is a speaker of this stage channel.
      Parameters:
      memberId - The ID of the member to check.
      Returns:
      A Mono where, upon successful completion, emits true if the member represented by the provided Snowflake is a speaker of this stage channel, false otherwise. If an error is received, it is emitted through the Mono.
    • getVoiceConnection

      public Mono<VoiceConnection> getVoiceConnection()
      Returns the current voice connection registered for this stage channel's guild.
      Specified by:
      getVoiceConnection in interface AudioChannel
      Returns:
      A Mono of VoiceConnection for this stage channel's guild if present, or empty otherwise. The resulting Mono will also complete empty if the registered voice connection is not associated with this stage channel.
    • getRequestsToSpeak

      public Flux<VoiceState> getRequestsToSpeak()
      Requests to retrieve the voice states of this channel with a request to speak.
      Returns:
      A Flux that continually emits the voice states of this stage channel with a request to speak. If an error is received, it is emitted through the Flux.
    • getSpeakers

      public Flux<VoiceState> getSpeakers()
      Requests to retrieve the voice states of this channel associated to speaker users.
      Returns:
      A Flux that continually emits the voice states of this stage channel associated to speaker users. If an error is received, it is emitted through the Flux.
    • isStageLive

      public Mono<Boolean> isStageLive()
      Requests to retrieve if there is a StageInstance for this channel.
      Returns:
      A Mono where, upon successful completion, emits true if this stage channel is associated with a StageInstance, false otherwise. If an error is received, it is emitted through the Mono.
    • startStageLive

      public Mono<StageInstance> startStageLive(String topic, @Nullable String reason)
      Requests to start a StageInstance on this channel.
      Parameters:
      topic - The topic of this StageInstance
      reason - The reason, if present
      Returns:
      A Mono where, upon successful completion, emits a StageInstance created for this channel with the specified . If an error is received, it is emitted through the Mono
    • toString

      public String toString()
    • getEffectivePermissions

      public Mono<PermissionSet> getEffectivePermissions(Snowflake memberId)
      Description copied from interface: GuildChannel
      Gets the permissions for the given member, taking into account permission overwrites in this channel.
      Specified by:
      getEffectivePermissions in interface GuildChannel
      Parameters:
      memberId - The ID of the member to get permissions for.
      Returns:
      The permissions for the given member.
    • getEffectivePermissions

      public Mono<PermissionSet> getEffectivePermissions(Member member)
      Description copied from interface: GuildChannel
      Gets the permissions for the given member, taking into account permission overwrites in this channel.
      Specified by:
      getEffectivePermissions in interface GuildChannel
      Parameters:
      member - The member to get permissions for.
      Returns:
      The permissions for the given member.
    • getClient

      public final GatewayDiscordClient getClient()
      Description copied from interface: DiscordObject
      Returns the GatewayDiscordClient that created this object. Methods in it are exclusively based on the entity cache or Store in use. Refer to calling getClient().rest() to access a DiscordClient that is capable of requesting entities directly from the REST API.
      Specified by:
      getClient in interface DiscordObject
      Returns:
      The GatewayDiscordClient associated to this object.
    • getRestChannel

      public final RestChannel getRestChannel()
      Description copied from interface: Channel
      Return a RestChannel handle to execute REST API operations on this entity.
      Specified by:
      getRestChannel in interface Channel
    • getData

      public final discord4j.discordjson.json.ChannelData getData()
      Description copied from interface: Channel
      Gets the raw data as represented by Discord.
      Specified by:
      getData in interface Channel
      Returns:
      The raw data as represented by Discord.
    • equals

      public final boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object