Interface StageChannel
- All Superinterfaces:
AudioChannel
,Channel
,Comparable<GuildChannel>
,Formattable
,GuildChannel
,ICategorizableChannel
,ICopyableChannel
,IInviteContainer
,IMemberContainer
,IMentionable
,IPermissionContainer
,IPositionableChannel
,ISnowflake
,StandardGuildChannel
This is a specialized AudioChannel that can be used to host events with speakers and listeners.
-
Field Summary
Fields inherited from interface net.dv8tion.jda.api.entities.GuildChannel
JUMP_URL
-
Method Summary
Modifier and TypeMethodDescriptionCancels theRequest-to-Speak
.default ChannelAction<StageChannel>
Creates a copy of the specifiedGuildChannel
.createCopy
(Guild guild) Creates a copy of the specifiedGuildChannel
in the specifiedGuild
.default StageInstanceAction
createStageInstance
(String topic) Create a newStageInstance
for this stage channel.Returns theChannelManager
for this GuildChannel.StageInstance
attached to this stage channel.default boolean
isModerator
(Member member) Whether this member is considered a moderator for this stage channel.Sends arequest-to-speak
indicator to the stage instance moderators.Methods inherited from interface net.dv8tion.jda.api.entities.AudioChannel
getBitrate, getRegion, getRegionRaw
Methods inherited from interface net.dv8tion.jda.api.entities.Channel
formatTo, getAsMention, getJDA, getName, getType
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface net.dv8tion.jda.api.entities.GuildChannel
delete, getGuild, getJumpUrl, getPermissionContainer
Methods inherited from interface net.dv8tion.jda.api.entities.ICategorizableChannel
getParentCategory, getParentCategoryId, getParentCategoryIdLong, isSynced
Methods inherited from interface net.dv8tion.jda.api.entities.IInviteContainer
createInvite, retrieveInvites
Methods inherited from interface net.dv8tion.jda.api.entities.IMemberContainer
getMembers
Methods inherited from interface net.dv8tion.jda.api.entities.IPermissionContainer
getMemberPermissionOverrides, getPermissionOverride, getPermissionOverrides, getRolePermissionOverrides, upsertPermissionOverride
Methods inherited from interface net.dv8tion.jda.api.entities.IPositionableChannel
getPosition, getPositionRaw
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
Method Details
-
getStageInstance
StageInstance
attached to this stage channel.This indicates whether a stage channel is currently "live".
- Returns:
- The
StageInstance
ornull
if this stage is not live
-
createStageInstance
Create a newStageInstance
for this stage channel.Possible
ErrorResponses
include:STAGE_ALREADY_OPEN
If there already is an activeStageInstance
for this channelUNKNOWN_CHANNEL
If the channel was deleted
- Parameters:
topic
- The topic of this stage instance, must be 1-120 characters long- Returns:
StageInstanceAction
- Throws:
InsufficientPermissionException
- If the self member is not a stage moderator. (SeeisModerator(Member)
)IllegalArgumentException
- If the topic is null, empty, or longer than 120 characters
-
isModerator
Whether this member is considered a moderator for this stage channel.
Moderators can modify theStage Instance
and promote speakers. To promote a speaker you can useGuildVoiceState.inviteSpeaker()
orGuildVoiceState.approveSpeaker()
if they have already raised their hand (indicated byGuildVoiceState.getRequestToSpeakTimestamp()
). A stage moderator can move between speaker and audience without raising their hand. This can be done withGuild.requestToSpeak()
andGuild.cancelRequestToSpeak()
respectively.A member is considered a stage moderator if they have these permissions in the stage channel:
- Parameters:
member
- The member to check- Returns:
- True, if the provided member is a stage moderator
- Throws:
IllegalArgumentException
- If the provided member is null or not from this guild
-
createCopy
Description copied from interface:ICopyableChannel
Creates a copy of the specifiedGuildChannel
in the specifiedGuild
.
If the provided target guild is not the same Guild this channel is in then the parent category and permissions will not be copied due to technical difficulty and ambiguity.This copies the following elements:
- Name
- Parent Category (if present)
- Voice Elements (Bitrate, Userlimit)
- Text Elements (Topic, NSFW, Slowmode)
- All permission overrides for Members/Roles
Possible
ErrorResponses
caused by the returnedRestAction
include the following:MISSING_PERMISSIONS
The channel could not be created due to a permission discrepancyMISSING_ACCESS
TheVIEW_CHANNEL
permission was removed
- Specified by:
createCopy
in interfaceICopyableChannel
- Specified by:
createCopy
in interfaceStandardGuildChannel
- Parameters:
guild
- TheGuild
to create the channel in- Returns:
- A specific
ChannelAction
This action allows to set fields for the new GuildChannel before creating it!
-
createCopy
Description copied from interface:ICopyableChannel
Creates a copy of the specifiedGuildChannel
.This copies the following elements:
- Name
- Parent Category (if present)
- Voice Elements (Bitrate, Userlimit)
- Text Elements (Topic, NSFW, Slowmode)
- All permission overrides for Members/Roles
Possible
ErrorResponses
caused by the returnedRestAction
include the following:MISSING_PERMISSIONS
The channel could not be created due to a permission discrepancyMISSING_ACCESS
TheVIEW_CHANNEL
permission was removed
- Specified by:
createCopy
in interfaceICopyableChannel
- Specified by:
createCopy
in interfaceStandardGuildChannel
- Returns:
- A specific
ChannelAction
This action allows to set fields for the new GuildChannel before creating it!
-
getManager
Description copied from interface:GuildChannel
Returns theChannelManager
for this GuildChannel.
In the ChannelManager, you can modify the name, topic and position of this GuildChannel. You modify multiple fields in one request by chaining setters before callingRestAction.queue()
.This is a lazy idempotent getter. The manager is retained after the first call. This getter is not thread-safe and would require guards by the user.
- Specified by:
getManager
in interfaceAudioChannel
- Specified by:
getManager
in interfaceGuildChannel
- Specified by:
getManager
in interfaceICategorizableChannel
- Specified by:
getManager
in interfaceIPermissionContainer
- Specified by:
getManager
in interfaceIPositionableChannel
- Specified by:
getManager
in interfaceStandardGuildChannel
- Returns:
- The ChannelManager of this GuildChannel
-
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:
IllegalStateException
- If the self member is not currently connected to the channel- See Also:
-
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:
IllegalStateException
- If the self member is not currently connected to the channel- See Also:
-