Interface WebhookUpdaterDelegate


  • public interface WebhookUpdaterDelegate
    This class is internally used by the WebhookUpdater to update webhooks. You usually don't want to interact with this object.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void removeAvatar()
      Queues the avatar to be removed.
      void setAuditLogReason​(java.lang.String reason)
      Sets the reason for this update.
      void setAvatar​(byte[] avatar)
      Queues the avatar to be updated.
      void setAvatar​(byte[] avatar, java.lang.String fileType)
      Queues the avatar to be updated.
      void setAvatar​(java.awt.image.BufferedImage avatar)
      Queues the avatar to be updated.
      void setAvatar​(java.awt.image.BufferedImage avatar, java.lang.String fileType)
      Queues the avatar to be updated.
      void setAvatar​(java.io.File avatar)
      Queues the avatar to be updated.
      void setAvatar​(java.io.InputStream avatar)
      Queues the avatar to be updated.
      void setAvatar​(java.io.InputStream avatar, java.lang.String fileType)
      Queues the avatar to be updated.
      void setAvatar​(java.net.URL avatar)
      Queues the avatar to be updated.
      void setAvatar​(Icon avatar)
      Queues the avatar to be updated.
      void setChannel​(ServerTextChannel channel)
      Queues the channel to be updated.
      void setName​(java.lang.String name)
      Queues the name to be updated.
      java.util.concurrent.CompletableFuture<Webhook> 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 webhook.
      • setChannel

        void setChannel​(ServerTextChannel channel)
        Queues the channel to be updated.
        Parameters:
        channel - The new channel of the webhook.
      • setAvatar

        void setAvatar​(java.awt.image.BufferedImage avatar)
        Queues the avatar to be updated. This method assumes the file type is "png"!
        Parameters:
        avatar - The avatar to set.
      • setAvatar

        void setAvatar​(java.awt.image.BufferedImage avatar,
                       java.lang.String fileType)
        Queues the avatar to be updated.
        Parameters:
        avatar - The avatar to set.
        fileType - The type of the avatar, e.g. "png" or "jpg".
      • setAvatar

        void setAvatar​(java.io.File avatar)
        Queues the avatar to be updated.
        Parameters:
        avatar - The avatar to set.
      • setAvatar

        void setAvatar​(Icon avatar)
        Queues the avatar to be updated.
        Parameters:
        avatar - The avatar to set.
      • setAvatar

        void setAvatar​(java.net.URL avatar)
        Queues the avatar to be updated.
        Parameters:
        avatar - The avatar to set.
      • setAvatar

        void setAvatar​(byte[] avatar)
        Queues the avatar to be updated. This method assumes the file type is "png"!
        Parameters:
        avatar - The avatar to set.
      • setAvatar

        void setAvatar​(byte[] avatar,
                       java.lang.String fileType)
        Queues the avatar to be updated.
        Parameters:
        avatar - The avatar to set.
        fileType - The type of the avatar, e.g. "png" or "jpg".
      • setAvatar

        void setAvatar​(java.io.InputStream avatar)
        Queues the avatar to be updated. This method assumes the file type is "png"!
        Parameters:
        avatar - The avatar to set.
      • setAvatar

        void setAvatar​(java.io.InputStream avatar,
                       java.lang.String fileType)
        Queues the avatar to be updated.
        Parameters:
        avatar - The avatar to set.
        fileType - The type of the avatar, e.g. "png" or "jpg".
      • removeAvatar

        void removeAvatar()
        Queues the avatar to be removed.
      • update

        java.util.concurrent.CompletableFuture<Webhook> update()
        Performs the queued updates.
        Returns:
        The updated webhook or the current instance if no updates were queued.