Interface Sticker

    • Method Detail

      • getPackId

        java.util.Optional<java.lang.Long> getPackId()
        Gets the ID of the sticker pack. Only present for standard stickers when they are from a sticker pack.
        Returns:
        The ID of the sticker pack.
      • getDescription

        java.lang.String getDescription()
        Gets the description of the sticker.
        Returns:
        The description of the sticker.
      • getTags

        java.lang.String getTags()
        Tags for autocompletion/suggestion of the sticker. Character limit of 200 characters.
        Returns:
        The tags of the sticker.
      • getType

        StickerType getType()
        Gets the sticker's type.
        Returns:
        The sticker's type.
      • getFormatType

        StickerFormatType getFormatType()
        Gets the sticker's format type.
        Returns:
        The sticker's format type.
      • isAvailable

        java.util.Optional<java.lang.Boolean> isAvailable()
        Whether the sticker can be used or not if it's from a server. Stickers may be locked due to not enough server boosts.
        Returns:
        true, if the sticker is available to use. false otherwise.
      • getServerId

        java.util.Optional<java.lang.Long> getServerId()
        The ID of the server that owns this sticker.
        Returns:
        The ID of the server that owns this sticker.
      • getServer

        java.util.Optional<Server> getServer()
        The server that owns this sticker. May not be present if the sticker is from a server the bot is not invited to.
        Returns:
        The server that owns this sticker.
      • getUser

        java.util.Optional<User> getUser()
        The user that uploaded the sticker on the server.
        Returns:
        The user that uploaded the sticker on the server.
      • getSortValue

        java.util.Optional<java.lang.Integer> getSortValue()
        Gets the sticker's sort order within it's sticker pack.
        Returns:
        The sticker's sort order within it's sticker pack.
      • update

        default java.util.concurrent.CompletableFuture<Sticker> update​(java.lang.String name,
                                                                       java.lang.String description,
                                                                       java.lang.String tags)
        Updates the sticker with the given values.
        Parameters:
        name - The new name of the sticker.
        description - The new description of the sticker.
        tags - The new tags of the sticker.
        Returns:
        A future of the updated sticker object.
      • update

        default java.util.concurrent.CompletableFuture<Sticker> update​(java.lang.String name,
                                                                       java.lang.String description,
                                                                       java.lang.String tags,
                                                                       java.lang.String reason)
        Updates the sticker with the given values.
        Parameters:
        name - The new name of the sticker.
        description - The new description of the sticker.
        tags - The new tags of the sticker.
        reason - The reason for the audit log.
        Returns:
        A future of the updated sticker.
      • updateName

        default java.util.concurrent.CompletableFuture<Sticker> updateName​(java.lang.String name)
        Updates the name of the sticker.
        Parameters:
        name - The new name of the sticker.
        Returns:
        A future of the updated sticker object.
      • updateName

        default java.util.concurrent.CompletableFuture<Sticker> updateName​(java.lang.String name,
                                                                           java.lang.String reason)
        Updates the name of the sticker.
        Parameters:
        name - The new name of the sticker.
        reason - The reason for the audit log.
        Returns:
        A future of the updated sticker object.
      • updateDescription

        default java.util.concurrent.CompletableFuture<Sticker> updateDescription​(java.lang.String description)
        Updates the description of the sticker.
        Parameters:
        description - The new description of the sticker.
        Returns:
        A future of the updated sticker object.
      • updateDescription

        default java.util.concurrent.CompletableFuture<Sticker> updateDescription​(java.lang.String description,
                                                                                  java.lang.String reason)
        Updates the description of the sticker.
        Parameters:
        description - The new description of the sticker.
        reason - The reason for the audit log.
        Returns:
        A future of the updated sticker object.
      • updateTags

        default java.util.concurrent.CompletableFuture<Sticker> updateTags​(java.lang.String tags)
        Updates the tags of the sticker.
        Parameters:
        tags - The new tags of the sticker.
        Returns:
        A future of the updated sticker object.
      • updateTags

        default java.util.concurrent.CompletableFuture<Sticker> updateTags​(java.lang.String tags,
                                                                           java.lang.String reason)
        Updates the tags of the sticker.
        Parameters:
        tags - The new tags of the sticker.
        reason - The reason for th audit log.
        Returns:
        A future of the updated sticker object.
      • createUpdater

        StickerUpdater createUpdater()
        Creates a new sticker updater for the sticker.
        Returns:
        A new sticker updater for the sticker.
      • create

        static java.util.concurrent.CompletableFuture<Sticker> create​(Server server,
                                                                      java.lang.String name,
                                                                      java.lang.String tags,
                                                                      java.io.File file)
        Creates a new sticker with the given values.
        Parameters:
        server - The server where the sticker should be created on.
        name - The name of the sticker.
        tags - The tags of the sticker.
        file - The file to upload as sticker.
        Returns:
        A future of the final sticker object.
      • create

        static java.util.concurrent.CompletableFuture<Sticker> create​(Server server,
                                                                      java.lang.String name,
                                                                      java.lang.String description,
                                                                      java.lang.String tags,
                                                                      java.io.File file)
        Creates a new sticker with the given values.
        Parameters:
        server - The server where the sticker should be created on.
        name - The name of the sticker.
        description - The description of the sticker.
        tags - The tags of the sticker.
        file - The file to upload as sticker.
        Returns:
        A future of the final sticker object.
      • create

        static java.util.concurrent.CompletableFuture<Sticker> create​(Server server,
                                                                      java.lang.String name,
                                                                      java.lang.String description,
                                                                      java.lang.String tags,
                                                                      java.io.File file,
                                                                      java.lang.String reason)
        Creates a new sticker with the given values.
        Parameters:
        server - The server where the sticker should be created on.
        name - The name of the sticker.
        description - The description of the sticker.
        tags - The tags of the sticker.
        file - The file to upload as sticker.
        reason - The reason for the audit log.
        Returns:
        A future of the final sticker object.