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 long
AFK_CHANNEL
Used to reset the afk channel fieldstatic long
AFK_TIMEOUT
Used to reset the afk timeout fieldstatic long
BANNER
Used to reset the banner fieldstatic long
COMMUNITY_UPDATES_CHANNEL
Used to reset the community updates channel fieldstatic long
DESCRIPTION
Used to reset the description fieldstatic long
EXPLICIT_CONTENT_LEVEL
Used to reset the explicit content level fieldstatic long
ICON
Used to reset the icon fieldstatic long
MFA_LEVEL
Used to reset the mfa level fieldstatic long
NAME
Used to reset the name fieldstatic long
NOTIFICATION_LEVEL
Used to reset the default notification level fieldstatic long
REGION
Used to reset the region fieldstatic long
RULES_CHANNEL
Used to reset the rules channel fieldstatic long
SPLASH
Used to reset the splash fieldstatic long
SYSTEM_CHANNEL
Used to reset the system channel fieldstatic long
VANITY_URL
Used to reset the vanity code fieldstatic long
VERIFICATION_LEVEL
Used 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:
reset
in 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:
reset
in interfaceManager<GuildManager>
- Parameters:
fields
- Integer values containing the flags to reset.- Returns:
- GuildManager for chaining convenience
-
getGuild
@Nonnull Guild getGuild()
TheGuild
object of this Manager. Useful if this Manager was returned via a create function- Returns:
- The
Guild
of 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 isnull
or 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 theRegion
option. 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 Region
but 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 thisGuild
ornull
to reset- Returns:
- GuildManager for chaining convenience
-
setSplash
@Nonnull @CheckReturnValue GuildManager setSplash(@Nullable Icon splash)
-
setAfkChannel
@Nonnull @CheckReturnValue GuildManager setAfkChannel(@Nullable VoiceChannel afkChannel)
Sets the AFKVoiceChannel
of thisGuild
.- Parameters:
afkChannel
- The new afk channel for thisGuild
ornull
to 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 systemTextChannel
of thisGuild
.- Parameters:
systemChannel
- The new system channel for thisGuild
ornull
to 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 rulesTextChannel
of thisGuild
.- Parameters:
rulesChannel
- The new rules channel for thisGuild
ornull
to 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 updatesTextChannel
of thisGuild
.- Parameters:
communityUpdatesChannel
- The new community updates channel for thisGuild
ornull
to 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 Level
of thisGuild
.- Parameters:
level
- The new Verification Level for thisGuild
- Returns:
- GuildManager for chaining convenience
- Throws:
java.lang.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:
java.lang.IllegalArgumentException
- If the provided level isnull
or 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 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:
java.lang.IllegalArgumentException
- If the provided level isnull
or 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)
-
-