Interface ServerUpdaterDelegate
-
public interface ServerUpdaterDelegateThis class is internally used by theServerUpdaterto update servers. You usually don't want to interact with this object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddRolesToUser(User user, java.util.Collection<Role> roles)Queues a collection of roles to be assigned to the user.voidaddRoleToUser(User user, Role role)Queues a role to be assigned to the user.voidremoveAfkChannel()Queues the afk channel to be removed.voidremoveAllRolesFromUser(User user)Queues all roles to be removed from the user.voidremoveBanner()Queues the banner to be removed.voidremoveIcon()Queues the icon to be removed.voidremoveModeratorsOnlyChannel()Queues the moderators-only channel to be removed.voidremoveRoleFromUser(User user, Role role)Queues a role to be removed from the user.voidremoveRolesFromUser(User user, java.util.Collection<Role> roles)Queues a collection of roles to be removed from the user.voidremoveRulesChannel()Queues the rules channel to be removed.voidremoveSplash()Queues the splash to be removed.voidremoveSystemChannel()Queues the system channel to be removed.voidreorderRoles(java.util.List<Role> roles)Sets the new order for the server's roles.voidsetAfkChannel(ServerVoiceChannel afkChannel)Queues the afk channel to be updated.voidsetAfkTimeoutInSeconds(int afkTimeout)Queues the afk timeout in seconds to be updated.voidsetAuditLogReason(java.lang.String reason)Sets the reason for this update.voidsetBanner(byte[] banner)Queues the banner to be updated.voidsetBanner(byte[] banner, java.lang.String fileType)Queues the banner to be updated.voidsetBanner(java.awt.image.BufferedImage banner)Queues the banner to be updated.voidsetBanner(java.awt.image.BufferedImage banner, java.lang.String fileType)Queues the banner to be updated.voidsetBanner(java.io.File banner)Queues the banner to be updated.voidsetBanner(java.io.InputStream banner)Queues the banner to be updated.voidsetBanner(java.io.InputStream banner, java.lang.String fileType)Queues the banner to be updated.voidsetBanner(java.net.URL banner)Queues the banner to be updated.voidsetBanner(Icon banner)Queues the banner to be updated.voidsetDeafened(User user, boolean deafened)Queues a user's deafened state to be updated.voidsetDefaultMessageNotificationLevel(DefaultMessageNotificationLevel defaultMessageNotificationLevel)Queues the default message notification level to be updated.voidsetExplicitContentFilterLevel(ExplicitContentFilterLevel explicitContentFilterLevel)Queues the explicit content filter level to be updated.voidsetIcon(byte[] icon)Queues the icon to be updated.voidsetIcon(byte[] icon, java.lang.String fileType)Queues the icon to be updated.voidsetIcon(java.awt.image.BufferedImage icon)Queues the icon to be updated.voidsetIcon(java.awt.image.BufferedImage icon, java.lang.String fileType)Queues the icon to be updated.voidsetIcon(java.io.File icon)Queues the icon to be updated.voidsetIcon(java.io.InputStream icon)Queues the icon to be updated.voidsetIcon(java.io.InputStream icon, java.lang.String fileType)Queues the icon to be updated.voidsetIcon(java.net.URL icon)Queues the icon to be updated.voidsetIcon(Icon icon)Queues the icon to be updated.voidsetModeratorsOnlyChannel(ServerTextChannel moderatorsOnlyChannel)Queues the moderators-only channel to be updated.voidsetMuted(User user, boolean muted)Queues a user's muted state to be updated.voidsetName(java.lang.String name)Queues the name to be updated.voidsetNickname(User user, java.lang.String nickname)Queues a user's nickname to be updated.voidsetOwner(User owner)Queues the owner to be updated.voidsetPreferredLocale(java.util.Locale locale)Queues the locale of a "PUBLIC" server to be updated.voidsetRegion(Region region)Queues the region to be updated.voidsetRulesChannel(ServerTextChannel rulesChannel)Queues the rules channel to be updated.voidsetSplash(byte[] splash)Queues the splash to be updated.voidsetSplash(byte[] splash, java.lang.String fileType)Queues the splash to be updated.voidsetSplash(java.awt.image.BufferedImage splash)Queues the splash to be updated.voidsetSplash(java.awt.image.BufferedImage splash, java.lang.String fileType)Queues the splash to be updated.voidsetSplash(java.io.File splash)Queues the splash to be updated.voidsetSplash(java.io.InputStream splash)Queues the splash to be updated.voidsetSplash(java.io.InputStream splash, java.lang.String fileType)Queues the splash to be updated.voidsetSplash(java.net.URL splash)Queues the splash to be updated.voidsetSplash(Icon splash)Queues the splash to be updated.voidsetSystemChannel(ServerTextChannel systemChannel)Queues the system channel to be updated.voidsetUserTimeout(User user, java.time.Instant timeout)Queues a user's timeout to be updated.voidsetVerificationLevel(VerificationLevel verificationLevel)Queues the verification level to be updated.voidsetVoiceChannel(User user, ServerVoiceChannel channel)Queues a moving a user to a different voice channel.java.util.concurrent.CompletableFuture<java.lang.Void>update()Performs the queued updates.
-
-
-
Method Detail
-
setAuditLogReason
void setAuditLogReason(java.lang.String reason)
Sets the reason for this update. This reason will be visible in the audit log entry(s).- Parameters:
reason- The reason for this update.
-
setName
void setName(java.lang.String name)
Queues the name to be updated.- Parameters:
name- The new name of the server.
-
setRegion
void setRegion(Region region)
Queues the region to be updated.- Parameters:
region- The new region of the server.
-
setExplicitContentFilterLevel
void setExplicitContentFilterLevel(ExplicitContentFilterLevel explicitContentFilterLevel)
Queues the explicit content filter level to be updated.- Parameters:
explicitContentFilterLevel- The new explicit content filter level of the server.
-
setVerificationLevel
void setVerificationLevel(VerificationLevel verificationLevel)
Queues the verification level to be updated.- Parameters:
verificationLevel- The new verification level of the server.
-
setDefaultMessageNotificationLevel
void setDefaultMessageNotificationLevel(DefaultMessageNotificationLevel defaultMessageNotificationLevel)
Queues the default message notification level to be updated.- Parameters:
defaultMessageNotificationLevel- The new default message notification level of the server.
-
setAfkChannel
void setAfkChannel(ServerVoiceChannel afkChannel)
Queues the afk channel to be updated.- Parameters:
afkChannel- The new afk channel of the server.
-
removeAfkChannel
void removeAfkChannel()
Queues the afk channel to be removed.
-
setAfkTimeoutInSeconds
void setAfkTimeoutInSeconds(int afkTimeout)
Queues the afk timeout in seconds to be updated.- Parameters:
afkTimeout- The new afk timeout in seconds of the server.
-
setIcon
void setIcon(java.awt.image.BufferedImage icon)
Queues the icon to be updated. This method assumes the file type is "png"!- Parameters:
icon- The new icon of the server.
-
setIcon
void setIcon(java.awt.image.BufferedImage icon, java.lang.String fileType)Queues the icon to be updated.- Parameters:
icon- The new icon of the server.fileType- The type of the icon, e.g. "png" or "jpg".
-
setIcon
void setIcon(java.io.File icon)
Queues the icon to be updated.- Parameters:
icon- The new icon of the server.
-
setIcon
void setIcon(Icon icon)
Queues the icon to be updated.- Parameters:
icon- The new icon of the server.
-
setIcon
void setIcon(java.net.URL icon)
Queues the icon to be updated.- Parameters:
icon- The new icon of the server.
-
setIcon
void setIcon(byte[] icon)
Queues the icon to be updated. This method assumes the file type is "png"!- Parameters:
icon- The new icon of the server.
-
setIcon
void setIcon(byte[] icon, java.lang.String fileType)Queues the icon to be updated.- Parameters:
icon- The new icon of the server.fileType- The type of the icon, e.g. "png" or "jpg".
-
setIcon
void setIcon(java.io.InputStream icon)
Queues the icon to be updated. This method assumes the file type is "png"!- Parameters:
icon- The new icon of the server.
-
setIcon
void setIcon(java.io.InputStream icon, java.lang.String fileType)Queues the icon to be updated.- Parameters:
icon- The new icon of the server.fileType- The type of the icon, e.g. "png" or "jpg".
-
removeIcon
void removeIcon()
Queues the icon to be removed.
-
setOwner
void setOwner(User owner)
Queues the owner to be updated. You must be the owner of this server in order to transfer it!- Parameters:
owner- The new owner of the server.
-
setSplash
void setSplash(java.awt.image.BufferedImage splash)
Queues the splash to be updated. This method assumes the file type is "png"!- Parameters:
splash- The new splash of the server.
-
setSplash
void setSplash(java.awt.image.BufferedImage splash, java.lang.String fileType)Queues the splash to be updated.- Parameters:
splash- The new splash of the server.fileType- The type of the splash, e.g. "png" or "jpg".
-
setSplash
void setSplash(java.io.File splash)
Queues the splash to be updated.- Parameters:
splash- The new splash of the server.
-
setSplash
void setSplash(Icon splash)
Queues the splash to be updated.- Parameters:
splash- The new splash of the server.
-
setSplash
void setSplash(java.net.URL splash)
Queues the splash to be updated.- Parameters:
splash- The new splash of the server.
-
setSplash
void setSplash(byte[] splash)
Queues the splash to be updated. This method assumes the file type is "png"!- Parameters:
splash- The new splash of the server.
-
setSplash
void setSplash(byte[] splash, java.lang.String fileType)Queues the splash to be updated.- Parameters:
splash- The new splash of the server.fileType- The type of the splash, e.g. "png" or "jpg".
-
setSplash
void setSplash(java.io.InputStream splash)
Queues the splash to be updated. This method assumes the file type is "png"!- Parameters:
splash- The new splash of the server.
-
setSplash
void setSplash(java.io.InputStream splash, java.lang.String fileType)Queues the splash to be updated.- Parameters:
splash- The new splash of the server.fileType- The type of the splash, e.g. "png" or "jpg".
-
removeSplash
void removeSplash()
Queues the splash to be removed.
-
setBanner
void setBanner(java.awt.image.BufferedImage banner)
Queues the banner to be updated. This method assumes the file type is "png"!- Parameters:
banner- The new banner of the server.
-
setBanner
void setBanner(java.awt.image.BufferedImage banner, java.lang.String fileType)Queues the banner to be updated.- Parameters:
banner- The new banner of the server.fileType- The type of the banner, e.g. "png" or "jpg".
-
setBanner
void setBanner(java.io.File banner)
Queues the banner to be updated.- Parameters:
banner- The new banner of the server.
-
setBanner
void setBanner(Icon banner)
Queues the banner to be updated.- Parameters:
banner- The new banner of the server.
-
setBanner
void setBanner(java.net.URL banner)
Queues the banner to be updated.- Parameters:
banner- The new banner of the server.
-
setBanner
void setBanner(byte[] banner)
Queues the banner to be updated. This method assumes the file type is "png"!- Parameters:
banner- The new banner of the server.
-
setBanner
void setBanner(byte[] banner, java.lang.String fileType)Queues the banner to be updated.- Parameters:
banner- The new banner of the server.fileType- The type of the banner, e.g. "png" or "jpg".
-
setBanner
void setBanner(java.io.InputStream banner)
Queues the banner to be updated. This method assumes the file type is "png"!- Parameters:
banner- The new banner of the server.
-
setBanner
void setBanner(java.io.InputStream banner, java.lang.String fileType)Queues the banner to be updated.- Parameters:
banner- The new banner of the server.fileType- The type of the banner, e.g. "png" or "jpg".
-
removeBanner
void removeBanner()
Queues the banner to be removed.
-
setRulesChannel
void setRulesChannel(ServerTextChannel rulesChannel)
Queues the rules channel to be updated.- Parameters:
rulesChannel- The new rules channel of the server.
-
removeRulesChannel
void removeRulesChannel()
Queues the rules channel to be removed.
-
setModeratorsOnlyChannel
void setModeratorsOnlyChannel(ServerTextChannel moderatorsOnlyChannel)
Queues the moderators-only channel to be updated.- Parameters:
moderatorsOnlyChannel- The new moderators-only channel of the server.
-
removeModeratorsOnlyChannel
void removeModeratorsOnlyChannel()
Queues the moderators-only channel to be removed.
-
setPreferredLocale
void setPreferredLocale(java.util.Locale locale)
Queues the locale of a "PUBLIC" server to be updated.- Parameters:
locale- The new locale of the public server
-
setSystemChannel
void setSystemChannel(ServerTextChannel systemChannel)
Queues the system channel to be updated.- Parameters:
systemChannel- The new system channel of the server.
-
removeSystemChannel
void removeSystemChannel()
Queues the system channel to be removed.
-
setNickname
void setNickname(User user, java.lang.String nickname)
Queues a user's nickname to be updated.- Parameters:
user- The user whose nickname should be updated.nickname- The new nickname of the user.
-
setUserTimeout
void setUserTimeout(User user, java.time.Instant timeout)
Queues a user's timeout to be updated.- Parameters:
user- The user whose nickname should be updated.timeout- The new timeout of the user.
-
setMuted
void setMuted(User user, boolean muted)
Queues a user's muted state to be updated.- Parameters:
user- The user whose muted state should be updated.muted- The new muted state of the user.
-
setDeafened
void setDeafened(User user, boolean deafened)
Queues a user's deafened state to be updated.- Parameters:
user- The user whose deafened state should be updated.deafened- The new deafened state of the user.
-
setVoiceChannel
void setVoiceChannel(User user, ServerVoiceChannel channel)
Queues a moving a user to a different voice channel.- Parameters:
user- The user who should be moved.channel- The new voice channel of the user.
-
reorderRoles
void reorderRoles(java.util.List<Role> roles)
Sets the new order for the server's roles.- Parameters:
roles- An ordered list with the new role positions.
-
addRoleToUser
void addRoleToUser(User user, Role role)
Queues a role to be assigned to the user.- Parameters:
user- The user to whom the role should be assigned.role- The role to be assigned.
-
addRolesToUser
void addRolesToUser(User user, java.util.Collection<Role> roles)
Queues a collection of roles to be assigned to the user.- Parameters:
user- The user to whom the roles should be assigned.roles- The collection of roles to be assigned.
-
removeRoleFromUser
void removeRoleFromUser(User user, Role role)
Queues a role to be removed from the user.- Parameters:
user- The user who should lose the role.role- The role to be removed.
-
removeRolesFromUser
void removeRolesFromUser(User user, java.util.Collection<Role> roles)
Queues a collection of roles to be removed from the user.- Parameters:
user- The user who should lose the roles.roles- The collection of roles to be removed.
-
removeAllRolesFromUser
void removeAllRolesFromUser(User user)
Queues all roles to be removed from the user.- Parameters:
user- The user who should lose the roles.
-
update
java.util.concurrent.CompletableFuture<java.lang.Void> update()
Performs the queued updates.- Returns:
- A future to check if the update was successful.
-
-