Class GuildManagerImpl
java.lang.Object
net.dv8tion.jda.internal.requests.RestActionImpl<Void>
net.dv8tion.jda.internal.requests.restaction.AuditableRestActionImpl<Void>
net.dv8tion.jda.internal.managers.ManagerBase<GuildManager>
net.dv8tion.jda.internal.managers.GuildManagerImpl
- All Implemented Interfaces:
GuildManager
,Manager<GuildManager>
,RestAction<Void>
,AuditableRestAction<Void>
-
Field Summary
Fields inherited from class net.dv8tion.jda.internal.requests.RestActionImpl
LOG
Fields inherited from interface net.dv8tion.jda.api.requests.restaction.AuditableRestAction
MAX_REASON_LENGTH
Fields inherited from interface net.dv8tion.jda.api.managers.GuildManager
AFK_CHANNEL, AFK_TIMEOUT, BANNER, BOOST_PROGRESS_BAR_ENABLED, COMMUNITY_UPDATES_CHANNEL, DESCRIPTION, EXPLICIT_CONTENT_LEVEL, FEATURES, ICON, MFA_LEVEL, NAME, NOTIFICATION_LEVEL, RULES_CHANNEL, SAFETY_ALERTS_CHANNEL, SPLASH, SYSTEM_CHANNEL, VERIFICATION_LEVEL
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddFeatures
(Collection<String> features) Adds aGuild Feature
to the list of features.getGuild()
TheGuild
object of this Manager.removeFeatures
(Collection<String> features) Removes aGuild Feature
from the list of features.reset()
Resets all fields for this Managerreset
(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 enabled) 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
.setFeatures
(Collection<String> features) Sets the name of thisGuild
.setRulesChannel
(TextChannel rulesChannel) Sets the rulesTextChannel
of thisGuild
.setSafetyAlertsChannel
(TextChannel safetyAlertsChannel) Sets the safety alertsTextChannel
of thisGuild
.setSystemChannel
(TextChannel systemChannel) Sets the systemTextChannel
of thisGuild
.Sets theVerification Level
of thisGuild
.Methods inherited from class net.dv8tion.jda.internal.managers.ManagerBase
complete, deadline, isPermissionChecksEnabled, queue, setCheck, setPermissionChecksEnabled, timeout
Methods inherited from class net.dv8tion.jda.internal.requests.restaction.AuditableRestActionImpl
reason
Methods inherited from class net.dv8tion.jda.internal.requests.RestActionImpl
getCheck, getDefaultFailure, getDefaultSuccess, getDefaultTimeout, getJDA, handleResponse, isPassContext, priority, setDefaultFailure, setDefaultSuccess, setDefaultTimeout, setErrorMapper, setPassContext, submit
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.dv8tion.jda.api.requests.restaction.AuditableRestAction
reason
Methods inherited from interface net.dv8tion.jda.api.managers.GuildManager
addFeatures, removeFeatures, setInvitesDisabled
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, onSuccess, queue, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, submit, submit, submitAfter, submitAfter, zip
-
Constructor Details
-
GuildManagerImpl
-
-
Method Details
-
getGuild
Description copied from interface:GuildManager
TheGuild
object of this Manager. Useful if this Manager was returned via a create function- Specified by:
getGuild
in interfaceGuildManager
- Returns:
- The
Guild
of this Manager
-
reset
Description copied from interface:GuildManager
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:
GuildManager.NAME
GuildManager.ICON
GuildManager.SPLASH
GuildManager.AFK_CHANNEL
GuildManager.AFK_TIMEOUT
GuildManager.SYSTEM_CHANNEL
GuildManager.RULES_CHANNEL
GuildManager.COMMUNITY_UPDATES_CHANNEL
GuildManager.MFA_LEVEL
GuildManager.NOTIFICATION_LEVEL
GuildManager.EXPLICIT_CONTENT_LEVEL
GuildManager.VERIFICATION_LEVEL
GuildManager.BOOST_PROGRESS_BAR_ENABLED
GuildManager.FEATURES
- Specified by:
reset
in interfaceGuildManager
- Specified by:
reset
in interfaceManager<GuildManager>
- Overrides:
reset
in classManagerBase<GuildManager>
- Parameters:
fields
- Integer value containing the flags to reset.- Returns:
- GuildManager for chaining convenience
-
reset
Description copied from interface:GuildManager
Resets the fields specified by the provided bit-flag patterns.
Example:manager.reset(GuildManager.NAME, GuildManager.ICON);
Flag Constants:
GuildManager.NAME
GuildManager.ICON
GuildManager.SPLASH
GuildManager.AFK_CHANNEL
GuildManager.AFK_TIMEOUT
GuildManager.SYSTEM_CHANNEL
GuildManager.RULES_CHANNEL
GuildManager.COMMUNITY_UPDATES_CHANNEL
GuildManager.MFA_LEVEL
GuildManager.NOTIFICATION_LEVEL
GuildManager.EXPLICIT_CONTENT_LEVEL
GuildManager.VERIFICATION_LEVEL
GuildManager.BOOST_PROGRESS_BAR_ENABLED
GuildManager.FEATURES
- Specified by:
reset
in interfaceGuildManager
- Specified by:
reset
in interfaceManager<GuildManager>
- Overrides:
reset
in classManagerBase<GuildManager>
- Parameters:
fields
- Integer values containing the flags to reset.- Returns:
- GuildManager for chaining convenience
-
reset
Description copied from interface:Manager
Resets all fields for this Manager- Specified by:
reset
in interfaceManager<GuildManager>
- Overrides:
reset
in classManagerBase<GuildManager>
- Returns:
- The current Manager with all settings reset to default
-
setName
Description copied from interface:GuildManager
Sets the name of thisGuild
.- Specified by:
setName
in interfaceGuildManager
- Parameters:
name
- The new name for thisGuild
- Returns:
- GuildManager for chaining convenience
-
setIcon
Description copied from interface:GuildManager
- Specified by:
setIcon
in interfaceGuildManager
- Parameters:
icon
- The new icon for thisGuild
ornull
to reset- Returns:
- GuildManager for chaining convenience
-
setSplash
Description copied from interface:GuildManager
- Specified by:
setSplash
in interfaceGuildManager
- Parameters:
splash
- The new splash for thisGuild
ornull
to reset- Returns:
- GuildManager for chaining convenience
-
setAfkChannel
Description copied from interface:GuildManager
Sets the AFKVoiceChannel
of thisGuild
.- Specified by:
setAfkChannel
in interfaceGuildManager
- Parameters:
afkChannel
- The new afk channel for thisGuild
ornull
to reset- Returns:
- GuildManager for chaining convenience
-
setSystemChannel
Description copied from interface:GuildManager
Sets the systemTextChannel
of thisGuild
.- Specified by:
setSystemChannel
in interfaceGuildManager
- Parameters:
systemChannel
- The new system channel for thisGuild
ornull
to reset- Returns:
- GuildManager for chaining convenience
-
setRulesChannel
Description copied from interface:GuildManager
Sets the rulesTextChannel
of thisGuild
.- Specified by:
setRulesChannel
in interfaceGuildManager
- Parameters:
rulesChannel
- The new rules channel for thisGuild
ornull
to reset- Returns:
- GuildManager for chaining convenience
-
setCommunityUpdatesChannel
@Nonnull @CheckReturnValue public GuildManagerImpl setCommunityUpdatesChannel(TextChannel communityUpdatesChannel) Description copied from interface:GuildManager
Sets the community updatesTextChannel
of thisGuild
.- Specified by:
setCommunityUpdatesChannel
in interfaceGuildManager
- Parameters:
communityUpdatesChannel
- The new community updates channel for thisGuild
ornull
to reset- Returns:
- GuildManager for chaining convenience
-
setSafetyAlertsChannel
@Nonnull @CheckReturnValue public GuildManagerImpl setSafetyAlertsChannel(TextChannel safetyAlertsChannel) Description copied from interface:GuildManager
Sets the safety alertsTextChannel
of thisGuild
.- Specified by:
setSafetyAlertsChannel
in interfaceGuildManager
- Parameters:
safetyAlertsChannel
- The new safety alerts channel for thisGuild
ornull
to reset- Returns:
- GuildManager for chaining convenience
-
setAfkTimeout
Description copied from interface:GuildManager
- Specified by:
setAfkTimeout
in interfaceGuildManager
- Parameters:
timeout
- The new afk timeout for thisGuild
- Returns:
- GuildManager for chaining convenience
-
setVerificationLevel
@Nonnull @CheckReturnValue public GuildManagerImpl setVerificationLevel(@Nonnull Guild.VerificationLevel level) Description copied from interface:GuildManager
Sets theVerification Level
of thisGuild
.- Specified by:
setVerificationLevel
in interfaceGuildManager
- Parameters:
level
- The new Verification Level for thisGuild
- Returns:
- GuildManager for chaining convenience
-
setDefaultNotificationLevel
@Nonnull @CheckReturnValue public GuildManagerImpl setDefaultNotificationLevel(@Nonnull Guild.NotificationLevel level) Description copied from interface:GuildManager
Sets theNotification Level
of thisGuild
.- Specified by:
setDefaultNotificationLevel
in interfaceGuildManager
- Parameters:
level
- The new Notification Level for thisGuild
- Returns:
- GuildManager for chaining convenience
-
setRequiredMFALevel
@Nonnull @CheckReturnValue public GuildManagerImpl setRequiredMFALevel(@Nonnull Guild.MFALevel level) Description copied from interface:GuildManager
- Specified by:
setRequiredMFALevel
in interfaceGuildManager
- Parameters:
level
- The new MFA Level for thisGuild
- Returns:
- GuildManager for chaining convenience
-
setExplicitContentLevel
@Nonnull @CheckReturnValue public GuildManagerImpl setExplicitContentLevel(@Nonnull Guild.ExplicitContentLevel level) Description copied from interface:GuildManager
Sets theExplicit Content Level
of thisGuild
.- Specified by:
setExplicitContentLevel
in interfaceGuildManager
- Parameters:
level
- The new MFA Level for thisGuild
- Returns:
- GuildManager for chaining convenience
-
setBanner
Description copied from interface:GuildManager
- Specified by:
setBanner
in interfaceGuildManager
- Parameters:
banner
- The new banner for thisGuild
ornull
to reset- Returns:
- GuildManager for chaining convenience
-
setDescription
Description copied from interface:GuildManager
- Specified by:
setDescription
in interfaceGuildManager
- Parameters:
description
- The new description for thisGuild
ornull
to reset- Returns:
- GuildManager for chaining convenience
-
setBoostProgressBarEnabled
Description copied from interface:GuildManager
Sets whether thisGuild
should have its boost progress bar shown.- Specified by:
setBoostProgressBarEnabled
in interfaceGuildManager
- Parameters:
enabled
- Whether the boost progress bar should be shown for thisGuild
- Returns:
- GuildManager for chaining convenience
-
setFeatures
Description copied from interface:GuildManager
Configures the newfeatures
of theGuild
.
The list of available features, including which ones can be configured, is available in the Official Discord API Documentation.Example
List<String> features = new ArrayList<>(guild.getFeatures()); features.add("INVITES_DISABLED"); guild.getManager().setFeatures(features).queue();
- Specified by:
setFeatures
in interfaceGuildManager
- Parameters:
features
- The new features to use- Returns:
- GuildManager for chaining convenience
-
addFeatures
Description copied from interface:GuildManager
Adds aGuild Feature
to the list of features.
The list of available features, including which ones can be configured, is available in the Official Discord API Documentation.- Specified by:
addFeatures
in interfaceGuildManager
- Parameters:
features
- The features to add- Returns:
- GuildManager for chaining convenience
-
removeFeatures
Description copied from interface:GuildManager
Removes aGuild Feature
from the list of features.
The list of available features, including which ones can be configured, is available in the Official Discord API Documentation.- Specified by:
removeFeatures
in interfaceGuildManager
- Parameters:
features
- The features to remove- Returns:
- GuildManager for chaining convenience
-