Interface WebhookBuilderDelegate


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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.concurrent.CompletableFuture<IncomingWebhook> create()
      Creates the webhook.
      void setAuditLogReason​(java.lang.String reason)
      Sets the reason for this update.
      void setAvatar​(byte[] avatar)
      Sets the avatar.
      void setAvatar​(byte[] avatar, java.lang.String fileType)
      Sets the avatar.
      void setAvatar​(java.awt.image.BufferedImage avatar)
      Sets the avatar.
      void setAvatar​(java.awt.image.BufferedImage avatar, java.lang.String fileType)
      Sets the avatar.
      void setAvatar​(java.io.File avatar)
      Sets the avatar.
      void setAvatar​(java.io.InputStream avatar)
      Sets the avatar.
      void setAvatar​(java.io.InputStream avatar, java.lang.String fileType)
      Sets the avatar.
      void setAvatar​(java.net.URL avatar)
      Sets the avatar.
      void setAvatar​(Icon avatar)
      Sets the avatar.
      void setName​(java.lang.String name)
      Sets the name.
    • 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)
        Sets the name.
        Parameters:
        name - The new name of the webhook.
      • setAvatar

        void setAvatar​(java.awt.image.BufferedImage avatar)
        Sets the avatar. 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)
        Sets the avatar.
        Parameters:
        avatar - The avatar to set.
        fileType - The type of the avatar, e.g. "png" or "jpg".
      • setAvatar

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

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

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

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

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

        void setAvatar​(java.io.InputStream avatar)
        Sets the avatar. 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)
        Sets the avatar.
        Parameters:
        avatar - The avatar to set.
        fileType - The type of the avatar, e.g. "png" or "jpg".
      • create

        java.util.concurrent.CompletableFuture<IncomingWebhook> create()
        Creates the webhook.
        Returns:
        The created webhook.