Interface StageChannel
- All Superinterfaces:
AudioChannel,Channel,Comparable<GuildChannel>,Formattable,GuildChannel,GuildMessageChannel,IAgeRestrictedChannel,ICategorizableChannel,ICopyableChannel,IDetachableEntity,IInviteContainer,IMemberContainer,IMentionable,IPermissionContainer,IPositionableChannel,ISlowmodeChannel,ISnowflake,IWebhookContainer,MessageChannel,StandardGuildChannel
public interface StageChannel
extends StandardGuildChannel, GuildMessageChannel, AudioChannel, IWebhookContainer, IAgeRestrictedChannel, ISlowmodeChannel
Represents a Stage Channel.
This is a specialized AudioChannel that can be used to host events with speakers and listeners.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe maximum limit you can set withAudioChannelManager.setUserLimit(int).Fields inherited from interface net.dv8tion.jda.api.entities.channel.Channel
MAX_NAME_LENGTHFields inherited from interface net.dv8tion.jda.api.entities.channel.middleman.GuildChannel
JUMP_URLFields inherited from interface net.dv8tion.jda.api.entities.channel.attribute.ISlowmodeChannel
MAX_SLOWMODE -
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 specifiedGuildChannelin the specifiedGuild.default StageInstanceActioncreateStageInstance(String topic) Create a newStageInstancefor this stage channel.Returns theChannelManagerfor this GuildChannel.StageInstanceattached to this stage channel.default booleanisModerator(Member member) Whether this member is considered a moderator for this stage channel.Sends arequest-to-speakindicator to the stage instance moderators.Methods inherited from interface net.dv8tion.jda.api.entities.channel.middleman.AudioChannel
getBitrate, getRegion, getRegionRaw, getUserLimitMethods inherited from interface net.dv8tion.jda.api.entities.channel.Channel
formatTo, getAsMention, getFlags, getJDA, getName, getTypeMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface net.dv8tion.jda.api.entities.channel.middleman.GuildChannel
delete, getGuild, getJumpUrl, getPermissionContainerMethods inherited from interface net.dv8tion.jda.api.entities.channel.middleman.GuildMessageChannel
canTalk, canTalk, clearReactionsById, clearReactionsById, clearReactionsById, clearReactionsById, deleteMessages, deleteMessagesByIds, removeReactionById, removeReactionById, sendStickers, sendStickersMethods inherited from interface net.dv8tion.jda.api.entities.channel.attribute.IAgeRestrictedChannel
isNSFWMethods inherited from interface net.dv8tion.jda.api.entities.channel.attribute.ICategorizableChannel
getParentCategory, getParentCategoryId, getParentCategoryIdLong, getPositionInCategory, isSyncedMethods inherited from interface net.dv8tion.jda.api.entities.detached.IDetachableEntity
isDetachedMethods inherited from interface net.dv8tion.jda.api.entities.channel.attribute.IInviteContainer
createInvite, retrieveInvitesMethods inherited from interface net.dv8tion.jda.api.entities.channel.attribute.IMemberContainer
getMembersMethods inherited from interface net.dv8tion.jda.api.entities.channel.attribute.IPermissionContainer
getMemberPermissionOverrides, getPermissionOverride, getPermissionOverrides, getRolePermissionOverrides, upsertPermissionOverrideMethods inherited from interface net.dv8tion.jda.api.entities.channel.attribute.IPositionableChannel
getPosition, getPositionRawMethods inherited from interface net.dv8tion.jda.api.entities.channel.attribute.ISlowmodeChannel
getSlowmodeMethods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreatedMethods inherited from interface net.dv8tion.jda.api.entities.channel.attribute.IWebhookContainer
createWebhook, deleteWebhookById, retrieveWebhooksMethods inherited from interface net.dv8tion.jda.api.entities.channel.middleman.MessageChannel
addReactionById, addReactionById, deleteMessageById, deleteMessageById, editMessageAttachmentsById, editMessageAttachmentsById, editMessageAttachmentsById, editMessageAttachmentsById, editMessageById, editMessageById, editMessageById, editMessageById, editMessageComponentsById, editMessageComponentsById, editMessageComponentsById, editMessageComponentsById, editMessageEmbedsById, editMessageEmbedsById, editMessageEmbedsById, editMessageEmbedsById, editMessageFormatById, editMessageFormatById, endPollById, endPollById, getHistory, getHistoryAfter, getHistoryAfter, getHistoryAfter, getHistoryAround, getHistoryAround, getHistoryAround, getHistoryBefore, getHistoryBefore, getHistoryBefore, getHistoryFromBeginning, getIterableHistory, getLatestMessageId, getLatestMessageIdLong, pinMessageById, pinMessageById, purgeMessages, purgeMessages, purgeMessagesById, purgeMessagesById, purgeMessagesById, removeReactionById, removeReactionById, retrieveMessageById, retrieveMessageById, retrievePinnedMessages, retrievePollVotersById, retrievePollVotersById, retrieveReactionUsersById, retrieveReactionUsersById, sendFiles, sendFiles, sendMessage, sendMessage, sendMessageComponents, sendMessageComponents, sendMessageEmbeds, sendMessageEmbeds, sendMessageFormat, sendMessagePoll, sendTyping, unpinMessageById, unpinMessageById
-
Field Details
-
MAX_USERLIMIT
static final int MAX_USERLIMITThe maximum limit you can set withAudioChannelManager.setUserLimit(int). (10000)- See Also:
-
-
Method Details
-
getStageInstance
StageInstanceattached to this stage channel.This indicates whether a stage channel is currently "live".
- Returns:
- The
StageInstanceornullif this stage is not live
-
createStageInstance
Create a newStageInstancefor this stage channel.Possible
ErrorResponsesinclude:STAGE_ALREADY_OPEN
If there already is an activeStageInstancefor 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 charactersDetachedEntityException- If this entity isdetached
-
isModerator
Whether this member is considered a moderator for this stage channel.
Moderators can modify theStage Instanceand 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:ICopyableChannelCreates a copy of the specifiedGuildChannelin 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
ErrorResponsescaused by the returnedRestActioninclude the following:MISSING_PERMISSIONS
The channel could not be created due to a permission discrepancyMISSING_ACCESS
TheVIEW_CHANNELpermission was removed
- Specified by:
createCopyin interfaceICopyableChannel- Specified by:
createCopyin interfaceStandardGuildChannel- Parameters:
guild- TheGuildto 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:ICopyableChannelCreates 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
ErrorResponsescaused by the returnedRestActioninclude the following:MISSING_PERMISSIONS
The channel could not be created due to a permission discrepancyMISSING_ACCESS
TheVIEW_CHANNELpermission was removed
- Specified by:
createCopyin interfaceICopyableChannel- Specified by:
createCopyin interfaceStandardGuildChannel- Returns:
- A specific
ChannelAction
This action allows to set fields for the new GuildChannel before creating it!
-
getManager
Description copied from interface:GuildChannelReturns theChannelManagerfor 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().- Specified by:
getManagerin interfaceAudioChannel- Specified by:
getManagerin interfaceGuildChannel- Specified by:
getManagerin interfaceICategorizableChannel- Specified by:
getManagerin interfaceIPermissionContainer- Specified by:
getManagerin interfaceIPositionableChannel- Specified by:
getManagerin interfaceISlowmodeChannel- Specified by:
getManagerin interfaceStandardGuildChannel- Returns:
- The ChannelManager of this GuildChannel
- See Also:
-
requestToSpeak
Sends arequest-to-speakindicator to the stage instance moderators.If the self member has
Permission.VOICE_MUTE_OTHERSthis will immediately promote them to speaker.- Returns:
RestAction- Throws:
IllegalStateException- If the self member is not currently connected to the channelDetachedEntityException- If this entity isdetached- 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 channelDetachedEntityException- If this entity isdetached- See Also:
-