Package net.dv8tion.jda.api.managers
Interface StageInstanceManager
-
- All Superinterfaces:
AuditableRestAction<java.lang.Void>,Manager<StageInstanceManager>,RestAction<java.lang.Void>
public interface StageInstanceManager extends Manager<StageInstanceManager>
Manager providing functionality to update one or more fields for aStageInstance.Example
manager.setTopic("LMAO JOIN FOR FREE NITRO") .setPrivacyLevel(PrivacyLevel.PUBLIC) .queue(); manager.reset(ChannelManager.TOPIC | ChannelManager.PRIVACY_LEVEL) .setTopic("Talent Show | WINNER GETS FREE NITRO") .setPrivacyLevel(PrivacyLevel.GUILD_ONLY) .queue();- See Also:
StageInstance.getManager()
-
-
Field Summary
Fields Modifier and Type Field Description static longPRIVACY_LEVELUsed to reset the privacy level fieldstatic longTOPICUsed to reset the topic field
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StageInstancegetStageInstance()The associatedStageInstanceStageInstanceManagerreset(long fields)Resets the fields specified by the provided bit-flag pattern.StageInstanceManagerreset(long... fields)Resets the fields specified by the provided bit-flag patterns.StageInstanceManagersetPrivacyLevel(StageInstance.PrivacyLevel level)Sets thePrivacyLevelfor this stage instance.StageInstanceManagersetTopic(java.lang.String topic)Sets the topic for this stage instance.-
Methods inherited from interface net.dv8tion.jda.api.requests.restaction.AuditableRestAction
reason
-
Methods inherited from interface net.dv8tion.jda.api.managers.Manager
deadline, reset, setCheck, timeout
-
Methods inherited from interface net.dv8tion.jda.api.requests.RestAction
addCheck, and, and, complete, complete, completeAfter, delay, delay, delay, delay, flatMap, flatMap, getCheck, getJDA, map, mapToResult, onErrorFlatMap, onErrorFlatMap, onErrorMap, onErrorMap, queue, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, submit, submit, submitAfter, submitAfter, zip
-
-
-
-
Field Detail
-
TOPIC
static final long TOPIC
Used to reset the topic field- See Also:
- Constant Field Values
-
PRIVACY_LEVEL
static final long PRIVACY_LEVEL
Used to reset the privacy level field- See Also:
- Constant Field Values
-
-
Method Detail
-
reset
@Nonnull StageInstanceManager reset(long fields)
Resets the fields specified by the provided bit-flag pattern. You can specify a combination by using a bitwise OR concat of the flag constants.
Example:manager.reset(ChannelManager.TOPIC | ChannelManager.PRIVACY_LEVEL);Flag Constants:
- Specified by:
resetin interfaceManager<StageInstanceManager>- Parameters:
fields- Integer value containing the flags to reset.- Returns:
- StageInstanceManager for chaining convenience
-
reset
@Nonnull StageInstanceManager reset(long... fields)
Resets the fields specified by the provided bit-flag patterns.
Example:manager.reset(ChannelManager.TOPIC, ChannelManager.PRIVACY_LEVEL);Flag Constants:
- Specified by:
resetin interfaceManager<StageInstanceManager>- Parameters:
fields- Integer values containing the flags to reset.- Returns:
- StageInstanceManager for chaining convenience
-
getStageInstance
@Nonnull StageInstance getStageInstance()
The associatedStageInstance- Returns:
- The
StageInstance
-
setTopic
@Nonnull @CheckReturnValue StageInstanceManager setTopic(@Nullable java.lang.String topic)
Sets the topic for this stage instance.
This shows up in stage discovery and in the stage view.- Parameters:
topic- The topic or null to reset, must be 1-120 characters long- Returns:
- StageInstanceManager for chaining convenience
- Throws:
java.lang.IllegalArgumentException- If the topic is longer than 120 characters
-
setPrivacyLevel
@Nonnull @CheckReturnValue StageInstanceManager setPrivacyLevel(@Nonnull StageInstance.PrivacyLevel level)
Sets thePrivacyLevelfor this stage instance.
This indicates whether guild lurkers are allowed to join the stage instance or only guild members.- Parameters:
level- The privacy level- Returns:
- StageInstanceManager for chaining convenience
- Throws:
java.lang.IllegalArgumentException- If the privacy level is null orUNKNOWN
-
-