Class StageInstance

java.lang.Object
discord4j.core.object.entity.StageInstance
All Implemented Interfaces:
DiscordObject, Entity

public final class StageInstance extends Object implements Entity
A Discord stage instance.
  • Constructor Details

    • StageInstance

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

    • edit

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

      public Mono<Void> inviteMemberToStageSpeakers(Member member)
      Requests to invite the specified to the speakers of the stage channel associated with this stage instance.
      Parameters:
      member - The member to invite to the stage speakers
      Returns:
      A Mono where, upon successful completion, emits nothing; indicating that the specified has been invited to the speakers of the stage channel associated with this stage instance. If an error is received, it is emitted through the Mono.
    • moveMemberToStageAudience

      public Mono<Void> moveMemberToStageAudience(Member member)
      Requests to move the specified to the audience of the stage channel associated with this stage instance.
      Parameters:
      member - The member to move to the stage audience
      Returns:
      A Mono where, upon successful completion, emits nothing; indicating that the specified has been moved to the audience of the stage channel associated with this stage instance. If an error is received, it is emitted through the Mono.
    • getClient

      public 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.
    • getData

      public discord4j.discordjson.json.StageInstanceData getData()
      Gets the data of the stage instance.
      Returns:
      The data of the stage instance.
    • getId

      public Snowflake getId()
      Gets the stage instance ID.
      Specified by:
      getId in interface Entity
      Returns:
      The stage instance ID.
    • getChannelId

      public Snowflake getChannelId()
      Gets the channel ID associated to this stage instance.
      Returns:
      The channel ID associated to this stage instance.
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object