Package net.dv8tion.jda.api.managers
Interface GuildManager
- All Superinterfaces:
AuditableRestAction<Void>
,Manager<GuildManager>
,RestAction<Void>
Manager providing functionality to update one or more fields for a
Guild
.
Example
manager.setName("Official JDA Guild")
.setIcon(null)
.queue();
manager.reset(GuildManager.NAME | GuildManager.ICON)
.setName("Minn's Meme Den")
.setExplicitContentLevel(Guild.ExplicitContentLevel.HIGH)
.queue();
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final long
Used to reset the afk channel fieldstatic final long
Used to reset the afk timeout fieldstatic final long
Used to reset the banner fieldstatic final long
Used to reset the premium progress bar enabled fieldstatic final long
Used to reset the community updates channel fieldstatic final long
Used to reset the description fieldstatic final long
Used to reset the explicit content level fieldstatic final long
Used to reset the icon fieldstatic final long
Used to reset the mfa level fieldstatic final long
Used to reset the name fieldstatic final long
Used to reset the default notification level fieldstatic final long
Used to reset the rules channel fieldstatic final long
Used to reset the splash fieldstatic final long
Used to reset the system channel fieldstatic final long
Used to reset the verification level field -
Method Summary
Modifier and TypeMethodDescriptiongetGuild()
TheGuild
object of this Manager.reset
(long fields) Resets the fields specified by the provided bit-flag pattern.reset
(long... fields) Resets the fields specified by the provided bit-flag patterns.setAfkChannel
(VoiceChannel afkChannel) Sets the AFKVoiceChannel
of thisGuild
.setAfkTimeout
(Guild.Timeout timeout) setBoostProgressBarEnabled
(boolean boostProgressBarEnabled) Sets whether thisGuild
should have its boost progress bar shown.setCommunityUpdatesChannel
(TextChannel communityUpdatesChannel) Sets the community updatesTextChannel
of thisGuild
.Sets theNotification Level
of thisGuild
.setDescription
(String description) Sets theExplicit Content Level
of thisGuild
.Sets the name of thisGuild
.setRulesChannel
(TextChannel rulesChannel) Sets the rulesTextChannel
of thisGuild
.setSystemChannel
(TextChannel systemChannel) Sets the systemTextChannel
of thisGuild
.Sets theVerification Level
of thisGuild
.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 Details
-
NAME
static final long NAMEUsed to reset the name field- See Also:
-
ICON
static final long ICONUsed to reset the icon field- See Also:
-
SPLASH
static final long SPLASHUsed to reset the splash field- See Also:
-
AFK_CHANNEL
static final long AFK_CHANNELUsed to reset the afk channel field- See Also:
-
AFK_TIMEOUT
static final long AFK_TIMEOUTUsed to reset the afk timeout field- See Also:
-
SYSTEM_CHANNEL
static final long SYSTEM_CHANNELUsed to reset the system channel field- See Also:
-
MFA_LEVEL
static final long MFA_LEVELUsed to reset the mfa level field- See Also:
-
NOTIFICATION_LEVEL
static final long NOTIFICATION_LEVELUsed to reset the default notification level field- See Also:
-
EXPLICIT_CONTENT_LEVEL
static final long EXPLICIT_CONTENT_LEVELUsed to reset the explicit content level field- See Also:
-
VERIFICATION_LEVEL
static final long VERIFICATION_LEVELUsed to reset the verification level field- See Also:
-
BANNER
static final long BANNERUsed to reset the banner field- See Also:
-
DESCRIPTION
static final long DESCRIPTIONUsed to reset the description field- See Also:
-
RULES_CHANNEL
static final long RULES_CHANNELUsed to reset the rules channel field- See Also:
-
COMMUNITY_UPDATES_CHANNEL
static final long COMMUNITY_UPDATES_CHANNELUsed to reset the community updates channel field- See Also:
-
BOOST_PROGRESS_BAR_ENABLED
static final long BOOST_PROGRESS_BAR_ENABLEDUsed to reset the premium progress bar enabled field- See Also:
-
-
Method Details
-
reset
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(GuildManager.NAME | GuildManager.ICON);
Flag Constants:
- Specified by:
reset
in interfaceManager<GuildManager>
- Parameters:
fields
- Integer value containing the flags to reset.- Returns:
- GuildManager for chaining convenience
-
reset
Resets the fields specified by the provided bit-flag patterns. You can specify a combination by using a bitwise OR concat of the flag constants.
Example:manager.reset(GuildManager.NAME, GuildManager.ICON);
Flag Constants:
- Specified by:
reset
in interfaceManager<GuildManager>
- Parameters:
fields
- Integer values containing the flags to reset.- Returns:
- GuildManager for chaining convenience
-
getGuild
TheGuild
object of this Manager. Useful if this Manager was returned via a create function- Returns:
- The
Guild
of this Manager
-
setName
Sets the name of thisGuild
.- Parameters:
name
- The new name for thisGuild
- Returns:
- GuildManager for chaining convenience
- Throws:
IllegalArgumentException
- If the provided name isnull
or not between 2-100 characters long
-
setIcon
- Parameters:
icon
- The new icon for thisGuild
ornull
to reset- Returns:
- GuildManager for chaining convenience
-
setSplash
- Parameters:
splash
- The new splash for thisGuild
ornull
to reset- Returns:
- GuildManager for chaining convenience
- Throws:
IllegalStateException
- If the guild'sfeatures
do not includeINVITE_SPLASH
-
setAfkChannel
Sets the AFKVoiceChannel
of thisGuild
.- Parameters:
afkChannel
- The new afk channel for thisGuild
ornull
to reset- Returns:
- GuildManager for chaining convenience
- Throws:
IllegalArgumentException
- If the provided channel is not from this guild
-
setSystemChannel
Sets the systemTextChannel
of thisGuild
.- Parameters:
systemChannel
- The new system channel for thisGuild
ornull
to reset- Returns:
- GuildManager for chaining convenience
- Throws:
IllegalArgumentException
- If the provided channel is not from this guild
-
setRulesChannel
Sets the rulesTextChannel
of thisGuild
.- Parameters:
rulesChannel
- The new rules channel for thisGuild
ornull
to reset- Returns:
- GuildManager for chaining convenience
- Throws:
IllegalArgumentException
- If the provided channel is not from this guild
-
setCommunityUpdatesChannel
@Nonnull @CheckReturnValue GuildManager setCommunityUpdatesChannel(@Nullable TextChannel communityUpdatesChannel) Sets the community updatesTextChannel
of thisGuild
.- Parameters:
communityUpdatesChannel
- The new community updates channel for thisGuild
ornull
to reset- Returns:
- GuildManager for chaining convenience
- Throws:
IllegalArgumentException
- If the provided channel is not from this guild
-
setAfkTimeout
- Parameters:
timeout
- The new afk timeout for thisGuild
- Returns:
- GuildManager for chaining convenience
- Throws:
IllegalArgumentException
- If the provided timeout isnull
-
setVerificationLevel
@Nonnull @CheckReturnValue GuildManager setVerificationLevel(@Nonnull Guild.VerificationLevel level) Sets theVerification Level
of thisGuild
.- Parameters:
level
- The new Verification Level for thisGuild
- Returns:
- GuildManager for chaining convenience
- Throws:
IllegalArgumentException
- If the provided level isnull
or UNKNOWN
-
setDefaultNotificationLevel
@Nonnull @CheckReturnValue GuildManager setDefaultNotificationLevel(@Nonnull Guild.NotificationLevel level) Sets theNotification Level
of thisGuild
.- Parameters:
level
- The new Notification Level for thisGuild
- Returns:
- GuildManager for chaining convenience
- Throws:
IllegalArgumentException
- If the provided level isnull
or UNKNOWN
-
setRequiredMFALevel
- Parameters:
level
- The new MFA Level for thisGuild
- Returns:
- GuildManager for chaining convenience
- Throws:
IllegalArgumentException
- If the provided level isnull
or UNKNOWN
-
setExplicitContentLevel
@Nonnull @CheckReturnValue GuildManager setExplicitContentLevel(@Nonnull Guild.ExplicitContentLevel level) Sets theExplicit Content Level
of thisGuild
.- Parameters:
level
- The new MFA Level for thisGuild
- Returns:
- GuildManager for chaining convenience
- Throws:
IllegalArgumentException
- If the provided level isnull
or UNKNOWN
-
setBanner
- Parameters:
banner
- The new banner for thisGuild
ornull
to reset- Returns:
- GuildManager for chaining convenience
- Throws:
IllegalStateException
- If the guild'sfeatures
do not includeBANNER
-
setDescription
- Parameters:
description
- The new description for thisGuild
ornull
to reset- Returns:
- GuildManager for chaining convenience
- Throws:
IllegalStateException
- If the guild'sfeatures
do not includeVERIFIED
-
setBoostProgressBarEnabled
Sets whether thisGuild
should have its boost progress bar shown.- Parameters:
boostProgressBarEnabled
- Whether the boost progress bar should be shown for thisGuild
- Returns:
- GuildManager for chaining convenience
-