Package net.dv8tion.jda.api.managers
Interface GuildManager
-
- All Superinterfaces:
AuditableRestAction<Void>,Manager<GuildManager>,RestAction<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 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 longSPLASHUsed to reset the splash fieldstatic longSYSTEM_CHANNELUsed to reset the system channel 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.requests.RestAction
complete, complete, completeAfter, getJDA, queue, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, submit, submit, submitAfter, submitAfter
-
-
-
-
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
-
-
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 String name)
Sets the name of thisGuild.- Parameters:
name- The new name for thisGuild- Returns:
- GuildManager for chaining convenience
- Throws:
IllegalArgumentException- If the provided name isnullor not between 2-100 characters long
-
setRegion
@Nonnull @CheckReturnValue GuildManager setRegion(@Nonnull Region region)
- Parameters:
region- The new region for thisGuild- Returns:
- GuildManager for chaining convenience
- Throws:
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)
- Parameters:
splash- The new splash for thisGuildornullto reset- Returns:
- GuildManager for chaining convenience
- Throws:
IllegalArgumentException- If the guild'sfeaturesdoes not includeINVITE_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:
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:
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:
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:
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:
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:
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:
IllegalArgumentException- If the provided level isnullor UNKNOWN
-
-