Interface CustomEmojiBuilderDelegate


  • public interface CustomEmojiBuilderDelegate
    This class is internally used by the CustomEmojiBuilder to create custom emojis. You usually don't want to interact with this object.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addRoleToWhitelist​(Role role)
      Adds a role to the whitelist.
      java.util.concurrent.CompletableFuture<KnownCustomEmoji> create()
      Creates the custom emoji.
      void setAuditLogReason​(java.lang.String reason)
      Sets the reason for the creation.
      void setImage​(byte[] image)
      Sets the image of the emoji.
      void setImage​(byte[] image, java.lang.String type)
      Sets the image of the emoji.
      void setImage​(java.awt.image.BufferedImage image)
      Sets the image of the emoji.
      void setImage​(java.awt.image.BufferedImage image, java.lang.String type)
      Sets the image of the emoji.
      void setImage​(java.io.File image)
      Sets the image of the emoji.
      void setImage​(java.io.InputStream image)
      Sets the image of the emoji.
      void setImage​(java.io.InputStream image, java.lang.String type)
      Sets the image of the emoji.
      void setImage​(java.net.URL image)
      Sets the image of the emoji.
      void setImage​(Icon image)
      Sets the image of the emoji.
      void setName​(java.lang.String name)
      Sets the name of the emoji.
      void setWhitelist​(java.util.Collection<Role> roles)
      Sets the roles which should be whitelisted.
      void setWhitelist​(Role... roles)
      Sets the roles which should be whitelisted.
    • Method Detail

      • setAuditLogReason

        void setAuditLogReason​(java.lang.String reason)
        Sets the reason for the creation. 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 of the emoji.
        Parameters:
        name - The name of the emoji.
      • setImage

        void setImage​(Icon image)
        Sets the image of the emoji.
        Parameters:
        image - The image of the emoji.
      • setImage

        void setImage​(java.net.URL image)
        Sets the image of the emoji.
        Parameters:
        image - The image of the emoji.
      • setImage

        void setImage​(java.io.File image)
        Sets the image of the emoji.
        Parameters:
        image - The image file of the emoji.
      • setImage

        void setImage​(java.awt.image.BufferedImage image)
        Sets the image of the emoji. This method assumes that the provided image is a png.
        Parameters:
        image - The image of the emoji.
      • setImage

        void setImage​(java.awt.image.BufferedImage image,
                      java.lang.String type)
        Sets the image of the emoji.
        Parameters:
        image - The image of the emoji.
        type - The type of the image, e.g. "png", "jpg" or "gif".
      • setImage

        void setImage​(byte[] image)
        Sets the image of the emoji. This method assumes that the provided image is a png.
        Parameters:
        image - The image of the emoji.
      • setImage

        void setImage​(byte[] image,
                      java.lang.String type)
        Sets the image of the emoji.
        Parameters:
        image - The image of the emoji.
        type - The type of the image, e.g. "png", "jpg" or "gif".
      • setImage

        void setImage​(java.io.InputStream image)
        Sets the image of the emoji. This method assumes that the provided image is a png.
        Parameters:
        image - The image of the emoji.
      • setImage

        void setImage​(java.io.InputStream image,
                      java.lang.String type)
        Sets the image of the emoji.
        Parameters:
        image - The image of the emoji.
        type - The type of the image, e.g. "png", "jpg" or "gif".
      • addRoleToWhitelist

        void addRoleToWhitelist​(Role role)
        Adds a role to the whitelist. To be active, the whitelist must at least contain one role, otherwise everyone can use the emoji!
        Parameters:
        role - The role to add.
      • setWhitelist

        void setWhitelist​(java.util.Collection<Role> roles)
        Sets the roles which should be whitelisted. To be active, the whitelist must at least contain one role, otherwise everyone can use the emoji!
        Parameters:
        roles - The roles which should be whitelisted.
      • setWhitelist

        void setWhitelist​(Role... roles)
        Sets the roles which should be whitelisted. To be active, the whitelist must at least contain one role, otherwise everyone can use the emoji!
        Parameters:
        roles - The roles which should be whitelisted.
      • create

        java.util.concurrent.CompletableFuture<KnownCustomEmoji> create()
        Creates the custom emoji.
        Returns:
        The created custom emoji.