Package net.dv8tion.jda.api.managers
Interface GuildManager
-
- All Superinterfaces:
AuditableRestAction<java.lang.Void>,Manager<GuildManager>,RestAction<java.lang.Void>
public interface GuildManager extends Manager<GuildManager>
Manager providing functionality to update one or more fields for aGuild.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:
Guild.getManager()
-
-
Field Summary
Fields Modifier and Type Field Description static longAFK_CHANNELUsed to reset the afk channel fieldstatic longAFK_TIMEOUTUsed to reset the afk timeout fieldstatic longBANNERUsed to reset the banner fieldstatic longCOMMUNITY_UPDATES_CHANNELUsed to reset the community updates channel fieldstatic longDESCRIPTIONUsed to reset the description fieldstatic longEXPLICIT_CONTENT_LEVELUsed to reset the explicit content level fieldstatic longICONUsed to reset the icon fieldstatic longMFA_LEVELUsed to reset the mfa level fieldstatic longNAMEUsed to reset the name fieldstatic longNOTIFICATION_LEVELUsed to reset the default notification level fieldstatic longREGIONUsed to reset the region fieldstatic longRULES_CHANNELUsed to reset the rules channel fieldstatic longSPLASHUsed to reset the splash fieldstatic longSYSTEM_CHANNELUsed to reset the system channel fieldstatic longVANITY_URLUsed to reset the vanity code fieldstatic longVERIFICATION_LEVELUsed to reset the verification level field
-
Method Summary
-
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
-
NAME
static final long NAME
Used to reset the name field- See Also:
- Constant Field Values
-
REGION
static final long REGION
Used to reset the region field- See Also:
- Constant Field Values
-
ICON
static final long ICON
Used to reset the icon field- See Also:
- Constant Field Values
-
SPLASH
static final long SPLASH
Used to reset the splash field- See Also:
- Constant Field Values
-
AFK_CHANNEL
static final long AFK_CHANNEL
Used to reset the afk channel field- See Also:
- Constant Field Values
-
AFK_TIMEOUT
static final long AFK_TIMEOUT
Used to reset the afk timeout field- See Also:
- Constant Field Values
-
SYSTEM_CHANNEL
static final long SYSTEM_CHANNEL
Used to reset the system channel field- See Also:
- Constant Field Values
-
MFA_LEVEL
static final long MFA_LEVEL
Used to reset the mfa level field- See Also:
- Constant Field Values
-
NOTIFICATION_LEVEL
static final long NOTIFICATION_LEVEL
Used to reset the default notification level field- See Also:
- Constant Field Values
-
EXPLICIT_CONTENT_LEVEL
static final long EXPLICIT_CONTENT_LEVEL
Used to reset the explicit content level field- See Also:
- Constant Field Values
-
VERIFICATION_LEVEL
static final long VERIFICATION_LEVEL
Used to reset the verification level field- See Also:
- Constant Field Values
-
BANNER
static final long BANNER
Used to reset the banner field- See Also:
- Constant Field Values
-
VANITY_URL
static final long VANITY_URL
Used to reset the vanity code field- See Also:
- Constant Field Values
-
DESCRIPTION
static final long DESCRIPTION
Used to reset the description field- See Also:
- Constant Field Values
-
RULES_CHANNEL
static final long RULES_CHANNEL
Used to reset the rules channel field- See Also:
- Constant Field Values
-
COMMUNITY_UPDATES_CHANNEL
static final long COMMUNITY_UPDATES_CHANNEL
Used to reset the community updates channel field- See Also:
- Constant Field Values
-
-
Method Detail
-
reset
@Nonnull GuildManager 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(GuildManager.NAME | GuildManager.ICON);Flag Constants:
- Specified by:
resetin interfaceManager<GuildManager>- Parameters:
fields- Integer value containing the flags to reset.- Returns:
- GuildManager for chaining convenience
-
reset
@Nonnull GuildManager reset(long... fields)
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:
resetin interfaceManager<GuildManager>- Parameters:
fields- Integer values containing the flags to reset.- Returns:
- GuildManager for chaining convenience
-
getGuild
@Nonnull Guild getGuild()
TheGuildobject of this Manager. Useful if this Manager was returned via a create function- Returns:
- The
Guildof this Manager
-
setName
@Nonnull @CheckReturnValue GuildManager setName(@Nonnull java.lang.String name)
Sets the name of thisGuild.- Parameters:
name- The new name for thisGuild- Returns:
- GuildManager for chaining convenience
- Throws:
java.lang.IllegalArgumentException- If the provided name isnullor not between 2-100 characters long
-
setRegion
@Nonnull @CheckReturnValue @Deprecated @ForRemoval(deadline="5.0.0") @ReplaceWith("ChannelManager.setRegion()") @DeprecatedSince("4.3.0") GuildManager setRegion(@Nonnull Region region)
Deprecated.Guilds no longer have theRegionoption. UseChannelManager.setRegion(Region)instead.- Parameters:
region- The new region for thisGuild- Returns:
- GuildManager for chaining convenience
- Throws:
java.lang.IllegalArgumentException- If the provided region is aVIP Regionbut the guild does not support VIP regions. UseGuild#getFeatures()to check if VIP regions are supported.- See Also:
Region.isVip(),Guild.getFeatures()
-
setIcon
@Nonnull @CheckReturnValue GuildManager setIcon(@Nullable Icon icon)
- Parameters:
icon- The new icon for thisGuildornullto reset- Returns:
- GuildManager for chaining convenience
-
setSplash
@Nonnull @CheckReturnValue GuildManager setSplash(@Nullable Icon splash)
-
setAfkChannel
@Nonnull @CheckReturnValue GuildManager setAfkChannel(@Nullable VoiceChannel afkChannel)
Sets the AFKVoiceChannelof thisGuild.- Parameters:
afkChannel- The new afk channel for thisGuildornullto reset- Returns:
- GuildManager for chaining convenience
- Throws:
java.lang.IllegalArgumentException- If the provided channel is not from this guild
-
setSystemChannel
@Nonnull @CheckReturnValue GuildManager setSystemChannel(@Nullable TextChannel systemChannel)
Sets the systemTextChannelof thisGuild.- Parameters:
systemChannel- The new system channel for thisGuildornullto reset- Returns:
- GuildManager for chaining convenience
- Throws:
java.lang.IllegalArgumentException- If the provided channel is not from this guild
-
setRulesChannel
@Nonnull @CheckReturnValue GuildManager setRulesChannel(@Nullable TextChannel rulesChannel)
Sets the rulesTextChannelof thisGuild.- Parameters:
rulesChannel- The new rules channel for thisGuildornullto reset- Returns:
- GuildManager for chaining convenience
- Throws:
java.lang.IllegalArgumentException- If the provided channel is not from this guild
-
setCommunityUpdatesChannel
@Nonnull @CheckReturnValue GuildManager setCommunityUpdatesChannel(@Nullable TextChannel communityUpdatesChannel)
Sets the community updatesTextChannelof thisGuild.- Parameters:
communityUpdatesChannel- The new community updates channel for thisGuildornullto reset- Returns:
- GuildManager for chaining convenience
- Throws:
java.lang.IllegalArgumentException- If the provided channel is not from this guild
-
setAfkTimeout
@Nonnull @CheckReturnValue GuildManager setAfkTimeout(@Nonnull Guild.Timeout timeout)
- Parameters:
timeout- The new afk timeout for thisGuild- Returns:
- GuildManager for chaining convenience
- Throws:
java.lang.IllegalArgumentException- If the provided timeout isnull
-
setVerificationLevel
@Nonnull @CheckReturnValue GuildManager setVerificationLevel(@Nonnull Guild.VerificationLevel level)
Sets theVerification Levelof thisGuild.- Parameters:
level- The new Verification Level for thisGuild- Returns:
- GuildManager for chaining convenience
- Throws:
java.lang.IllegalArgumentException- If the provided level isnullor UNKNOWN
-
setDefaultNotificationLevel
@Nonnull @CheckReturnValue GuildManager setDefaultNotificationLevel(@Nonnull Guild.NotificationLevel level)
Sets theNotification Levelof thisGuild.- Parameters:
level- The new Notification Level for thisGuild- Returns:
- GuildManager for chaining convenience
- Throws:
java.lang.IllegalArgumentException- If the provided level isnullor UNKNOWN
-
setRequiredMFALevel
@Nonnull @CheckReturnValue GuildManager setRequiredMFALevel(@Nonnull Guild.MFALevel level)
- Parameters:
level- The new MFA Level for thisGuild- Returns:
- GuildManager for chaining convenience
- Throws:
java.lang.IllegalArgumentException- If the provided level isnullor UNKNOWN
-
setExplicitContentLevel
@Nonnull @CheckReturnValue GuildManager setExplicitContentLevel(@Nonnull Guild.ExplicitContentLevel level)
Sets theExplicit Content Levelof thisGuild.- Parameters:
level- The new MFA Level for thisGuild- Returns:
- GuildManager for chaining convenience
- Throws:
java.lang.IllegalArgumentException- If the provided level isnullor UNKNOWN
-
setBanner
@Nonnull @CheckReturnValue GuildManager setBanner(@Nullable Icon banner)
-
setVanityCode
@Nonnull @CheckReturnValue GuildManager setVanityCode(@Nullable java.lang.String code)
-
setDescription
@Nonnull @CheckReturnValue GuildManager setDescription(@Nullable java.lang.String description)
-
-