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 Detail

      • setAuditLogReason

        void setAuditLogReason​(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​(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​(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​(BufferedImage icon,
                     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​(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​(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,
                     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​(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​(InputStream icon,
                     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​(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​(BufferedImage splash,
                       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​(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​(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,
                       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​(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​(InputStream splash,
                       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.
      • 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,
                         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.
      • 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​(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,
                            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,
                                 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

        CompletableFuture<Void> update​()
        Performs the queued updates.
        Returns:
        A future to check if the update was successful.