Interface ServerUpdaterDelegate


  • public interface ServerUpdaterDelegate
    This class is internally used by the ServerUpdater to 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
      void addRolesToUser​(User user, java.util.Collection<Role> roles)
      Queues a collection of roles to be assigned to the user.
      void addRoleToUser​(User user, Role role)
      Queues a role to be assigned to the user.
      void removeAfkChannel()
      Queues the afk channel to be removed.
      void removeAllRolesFromUser​(User user)
      Queues all roles to be removed from the user.
      void removeBanner()
      Queues the banner to be removed.
      void removeIcon()
      Queues the icon to be removed.
      void removeModeratorsOnlyChannel()
      Queues the moderators-only channel to be removed.
      void removeRoleFromUser​(User user, Role role)
      Queues a role to be removed from the user.
      void removeRolesFromUser​(User user, java.util.Collection<Role> roles)
      Queues a collection of roles to be removed from the user.
      void removeRulesChannel()
      Queues the rules channel to be removed.
      void removeSplash()
      Queues the splash to be removed.
      void removeSystemChannel()
      Queues the system channel to be removed.
      void reorderRoles​(java.util.List<Role> roles)
      Sets the new order for the server's roles.
      void setAfkChannel​(ServerVoiceChannel afkChannel)
      Queues the afk channel to be updated.
      void setAfkTimeoutInSeconds​(int afkTimeout)
      Queues the afk timeout in seconds to be updated.
      void setAuditLogReason​(java.lang.String reason)
      Sets the reason for this update.
      void setBanner​(byte[] banner)
      Queues the banner to be updated.
      void setBanner​(byte[] banner, java.lang.String fileType)
      Queues the banner to be updated.
      void setBanner​(java.awt.image.BufferedImage banner)
      Queues the banner to be updated.
      void setBanner​(java.awt.image.BufferedImage banner, java.lang.String fileType)
      Queues the banner to be updated.
      void setBanner​(java.io.File banner)
      Queues the banner to be updated.
      void setBanner​(java.io.InputStream banner)
      Queues the banner to be updated.
      void setBanner​(java.io.InputStream banner, java.lang.String fileType)
      Queues the banner to be updated.
      void setBanner​(java.net.URL banner)
      Queues the banner to be updated.
      void setBanner​(Icon banner)
      Queues the banner to be updated.
      void setDeafened​(User user, boolean deafened)
      Queues a user's deafened state to be updated.
      void setDefaultMessageNotificationLevel​(DefaultMessageNotificationLevel defaultMessageNotificationLevel)
      Queues the default message notification level to be updated.
      void setExplicitContentFilterLevel​(ExplicitContentFilterLevel explicitContentFilterLevel)
      Queues the explicit content filter level to be updated.
      void setIcon​(byte[] icon)
      Queues the icon to be updated.
      void setIcon​(byte[] icon, java.lang.String fileType)
      Queues the icon to be updated.
      void setIcon​(java.awt.image.BufferedImage icon)
      Queues the icon to be updated.
      void setIcon​(java.awt.image.BufferedImage icon, java.lang.String fileType)
      Queues the icon to be updated.
      void setIcon​(java.io.File icon)
      Queues the icon to be updated.
      void setIcon​(java.io.InputStream icon)
      Queues the icon to be updated.
      void setIcon​(java.io.InputStream icon, java.lang.String fileType)
      Queues the icon to be updated.
      void setIcon​(java.net.URL icon)
      Queues the icon to be updated.
      void setIcon​(Icon icon)
      Queues the icon to be updated.
      void setModeratorsOnlyChannel​(ServerTextChannel moderatorsOnlyChannel)
      Queues the moderators-only channel to be updated.
      void setMuted​(User user, boolean muted)
      Queues a user's muted state to be updated.
      void setName​(java.lang.String name)
      Queues the name to be updated.
      void setNickname​(User user, java.lang.String nickname)
      Queues a user's nickname to be updated.
      void setOwner​(User owner)
      Queues the owner to be updated.
      void setPreferredLocale​(java.util.Locale locale)
      Queues the locale of a "PUBLIC" server to be updated.
      void setRegion​(Region region)
      Queues the region to be updated.
      void setRulesChannel​(ServerTextChannel rulesChannel)
      Queues the rules channel to be updated.
      void setSplash​(byte[] splash)
      Queues the splash to be updated.
      void setSplash​(byte[] splash, java.lang.String fileType)
      Queues the splash to be updated.
      void setSplash​(java.awt.image.BufferedImage splash)
      Queues the splash to be updated.
      void setSplash​(java.awt.image.BufferedImage splash, java.lang.String fileType)
      Queues the splash to be updated.
      void setSplash​(java.io.File splash)
      Queues the splash to be updated.
      void setSplash​(java.io.InputStream splash)
      Queues the splash to be updated.
      void setSplash​(java.io.InputStream splash, java.lang.String fileType)
      Queues the splash to be updated.
      void setSplash​(java.net.URL splash)
      Queues the splash to be updated.
      void setSplash​(Icon splash)
      Queues the splash to be updated.
      void setSystemChannel​(ServerTextChannel systemChannel)
      Queues the system channel to be updated.
      void setUserTimeout​(User user, java.time.Instant timeout)
      Queues a user's timeout to be updated.
      void setVerificationLevel​(VerificationLevel verificationLevel)
      Queues the verification level to be updated.
      void setVoiceChannel​(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.