Package org.javacord.api.entity.sticker
Interface Sticker
-
- All Superinterfaces:
DiscordEntity,java.util.Formattable,Nameable,StickerAttachableListenerManager
public interface Sticker extends DiscordEntity, Nameable, StickerAttachableListenerManager
This class represents a Discord sticker object.- See Also:
- Discord Docs
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description 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.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.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.StickerUpdatercreateUpdater()Creates a new sticker updater for the sticker.default java.util.concurrent.CompletableFuture<java.lang.Void>delete()Deletes the sticker.java.util.concurrent.CompletableFuture<java.lang.Void>delete(java.lang.String reason)Deletes the sticker.java.lang.StringgetDescription()Gets the description of the sticker.StickerFormatTypegetFormatType()Gets the sticker's format type.java.util.Optional<java.lang.Long>getPackId()Gets the ID of the sticker pack.java.util.Optional<Server>getServer()The server that owns this sticker.java.util.Optional<java.lang.Long>getServerId()The ID of the server that owns this sticker.java.util.Optional<java.lang.Integer>getSortValue()Gets the sticker's sort order within it's sticker pack.java.lang.StringgetTags()Tags for autocompletion/suggestion of the sticker.StickerTypegetType()Gets the sticker's type.java.util.Optional<User>getUser()The user that uploaded the sticker on the server.java.util.Optional<java.lang.Boolean>isAvailable()Whether the sticker can be used or not if it's from a server.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.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.default java.util.concurrent.CompletableFuture<Sticker>updateDescription(java.lang.String description)Updates the description of the sticker.default java.util.concurrent.CompletableFuture<Sticker>updateDescription(java.lang.String description, java.lang.String reason)Updates the description of the sticker.default java.util.concurrent.CompletableFuture<Sticker>updateName(java.lang.String name)Updates the name of the sticker.default java.util.concurrent.CompletableFuture<Sticker>updateName(java.lang.String name, java.lang.String reason)Updates the name of the sticker.default java.util.concurrent.CompletableFuture<Sticker>updateTags(java.lang.String tags)Updates the tags of the sticker.default java.util.concurrent.CompletableFuture<Sticker>updateTags(java.lang.String tags, java.lang.String reason)Updates the tags of the sticker.-
Methods inherited from interface org.javacord.api.entity.DiscordEntity
getApi, getCreationTimestamp, getId, getIdAsString
-
Methods inherited from interface org.javacord.api.listener.server.sticker.StickerAttachableListenerManager
addStickerAttachableListener, addStickerChangeDescriptionListener, addStickerChangeNameListener, addStickerChangeTagsListener, addStickerDeleteListener, getStickerAttachableListeners, getStickerChangeDescriptionListeners, getStickerChangeNameListeners, getStickerChangeTagsListeners, getStickerDeleteListeners, removeListener, removeStickerAttachableListener
-
-
-
-
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.falseotherwise.
-
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.
-
delete
default java.util.concurrent.CompletableFuture<java.lang.Void> delete()
Deletes the sticker.- Returns:
- A future.
-
delete
java.util.concurrent.CompletableFuture<java.lang.Void> delete(java.lang.String reason)
Deletes the sticker.- Parameters:
reason- The reason for the audit log.- Returns:
- A future.
-
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.
-
-