Interface StageInstance
-
- All Superinterfaces:
ISnowflake
public interface StageInstance extends ISnowflake
A Stage Instance holds information about a live stage.This instance indicates an active stage channel with speakers, usually to host events such as presentations or meetings.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
StageInstance.PrivacyLevel
The privacy level for a stage instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description RestAction<java.lang.Void>
cancelRequestToSpeak()
Cancels theRequest-to-Speak
.RestAction<java.lang.Void>
delete()
Deletes this stage instancedefault java.util.List<Member>
getAudience()
All current audience members of this stage instance.StageChannel
getChannel()
TheStageChannel
for this stage instanceGuild
getGuild()
TheGuild
this stage instance is inStageInstanceManager
getManager()
TheStageInstanceManager
used to update this stage instance.StageInstance.PrivacyLevel
getPrivacyLevel()
TheStageInstance.PrivacyLevel
of this stage instancedefault java.util.List<Member>
getSpeakers()
All current speakers of this stage instance.java.lang.String
getTopic()
The topic of this stage instanceboolean
isDiscoverable()
Whether this stage instance can be found in stage discovery.RestAction<java.lang.Void>
requestToSpeak()
Sends arequest-to-speak
indicator to the stage instance moderators.-
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
-
-
-
Method Detail
-
getChannel
@Nonnull StageChannel getChannel()
TheStageChannel
for this stage instance- Returns:
- The
StageChannel
-
getTopic
@Nonnull java.lang.String getTopic()
The topic of this stage instance- Returns:
- The topic
-
getPrivacyLevel
@Nonnull StageInstance.PrivacyLevel getPrivacyLevel()
TheStageInstance.PrivacyLevel
of this stage instance- Returns:
- The
StageInstance.PrivacyLevel
-
isDiscoverable
boolean isDiscoverable()
Whether this stage instance can be found in stage discovery.- Returns:
- True if this is a public stage that can be found in stage discovery
-
getSpeakers
@Nonnull default java.util.List<Member> getSpeakers()
All current speakers of this stage instance.A member is considered a speaker when they are currently connected to the stage channel and their voice state is not
suppressed
. When a member is not a speaker, they are part of theaudience
.Only
stage moderators
can promote or invite speakers. A stage moderator can move between speaker and audience at any time.- Returns:
List
ofMembers
which can speak in this stage instance
-
getAudience
@Nonnull default java.util.List<Member> getAudience()
All current audience members of this stage instance.A member is considered part of the audience when they are currently connected to the stage channel and their voice state is
suppressed
. When a member is not part of the audience, they are considered aspeaker
.Only
stage moderators
can promote or invite speakers. A stage moderator can move between speaker and audience at any time.- Returns:
List
ofMembers
which cannot speak in this stage instance
-
delete
@Nonnull @CheckReturnValue RestAction<java.lang.Void> delete()
Deletes this stage instancePossible
ErrorResponses
include:UNKNOWN_STAGE_INSTANCE
If this stage instance is already deletedUNKNOWN_CHANNEL
If the channel was deleted
- Returns:
RestAction
- Throws:
InsufficientPermissionException
- If the self member is not astage moderator
-
requestToSpeak
@Nonnull @CheckReturnValue RestAction<java.lang.Void> requestToSpeak()
Sends arequest-to-speak
indicator to the stage instance moderators.If the self member has
Permission.VOICE_MUTE_OTHERS
this will immediately promote them to speaker.- Returns:
RestAction
- Throws:
java.lang.IllegalStateException
- If the self member is not currently connected to the channel of this stage instance- See Also:
cancelRequestToSpeak()
-
cancelRequestToSpeak
@Nonnull @CheckReturnValue RestAction<java.lang.Void> cancelRequestToSpeak()
Cancels theRequest-to-Speak
.
This can also be used to move back to the audience if you are currently a speaker.If there is no request to speak or the member is not currently connected to an active
StageInstance
, this does nothing.- Returns:
RestAction
- Throws:
java.lang.IllegalStateException
- If the self member is not currently connected to the channel of this stage instance- See Also:
requestToSpeak()
-
getManager
@Nonnull @CheckReturnValue StageInstanceManager getManager()
TheStageInstanceManager
used to update this stage instance.This can be used to update multiple fields such as topic and privacy level in one request
If this stage instance is already deleted, this will fail with
ErrorResponse.UNKNOWN_STAGE_INSTANCE
.- Returns:
- The
StageInstanceManager
- Throws:
InsufficientPermissionException
- If the self member is not astage moderator
-
-