Package org.javacord.core.entity.emoji
Class KnownCustomEmojiImpl
- java.lang.Object
-
- org.javacord.core.entity.emoji.CustomEmojiImpl
-
- org.javacord.core.entity.emoji.KnownCustomEmojiImpl
-
- All Implemented Interfaces:
Formattable
,DiscordEntity
,CustomEmoji
,Emoji
,KnownCustomEmoji
,Mentionable
,Nameable
,Updatable<Emoji>
,UpdatableFromCache<Emoji>
,KnownCustomEmojiAttachableListenerManager
,Specializable<Emoji>
,InternalKnownCustomEmojiAttachableListenerManager
public class KnownCustomEmojiImpl extends CustomEmojiImpl implements KnownCustomEmoji, InternalKnownCustomEmojiAttachableListenerManager
The implementation ofKnownCustomEmoji
.
-
-
Field Summary
-
Fields inherited from class org.javacord.core.entity.emoji.CustomEmojiImpl
name
-
-
Constructor Summary
Constructors Constructor Description KnownCustomEmojiImpl(DiscordApiImpl api, Server server, com.fasterxml.jackson.databind.JsonNode data)
Creates a new known custom emoji.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<Void>
delete(String reason)
CompletableFuture<Optional<User>>
getCreator()
Server
getServer()
Optional<Collection<Role>>
getWhitelistedRoles()
boolean
isManaged()
boolean
requiresColons()
void
setName(String name)
Sets the name of the custom emoji.void
setWhitelist(Collection<Role> whitelist)
Sets the whitelist of the custom emoji.String
toString()
-
Methods inherited from interface org.javacord.api.entity.emoji.CustomEmoji
asCustomEmoji, asKnownCustomEmoji, asUnicodeEmoji, getImage, getMentionTag, getReactionTag
-
Methods inherited from class org.javacord.core.entity.emoji.CustomEmojiImpl
equals, getApi, getId, getImage, getName, hashCode, isAnimated
-
Methods inherited from interface org.javacord.api.entity.DiscordEntity
getApi, getCreationTimestamp, getCreationTimestamp, getId, getIdAsString
-
Methods inherited from interface org.javacord.api.entity.emoji.Emoji
equalsEmoji, equalsEmoji, isAnimated, isCustomEmoji, isKnownCustomEmoji, isUnicodeEmoji
-
Methods inherited from interface org.javacord.core.listener.server.emoji.InternalKnownCustomEmojiAttachableListenerManager
addKnownCustomEmojiAttachableListener, addKnownCustomEmojiChangeNameListener, addKnownCustomEmojiChangeWhitelistedRolesListener, addKnownCustomEmojiDeleteListener, getApi, getId, getKnownCustomEmojiAttachableListeners, getKnownCustomEmojiChangeNameListeners, getKnownCustomEmojiChangeWhitelistedRolesListeners, getKnownCustomEmojiDeleteListeners, removeKnownCustomEmojiAttachableListener, removeListener
-
Methods inherited from interface org.javacord.api.entity.emoji.KnownCustomEmoji
createUpdater, delete, getCurrentCachedInstance, removeWhitelist, updateName, updateWhitelist, updateWhitelist
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.javacord.api.util.Specializable
as
-
Methods inherited from interface org.javacord.api.entity.UpdatableFromCache
getLatestInstance
-
-
-
-
Constructor Detail
-
KnownCustomEmojiImpl
public KnownCustomEmojiImpl(DiscordApiImpl api, Server server, com.fasterxml.jackson.databind.JsonNode data)
Creates a new known custom emoji.- Parameters:
api
- The discord api instance.server
- The server of the emoji.data
- The json data of the emoji.
-
-
Method Detail
-
setName
public void setName(String name)
Sets the name of the custom emoji.- Parameters:
name
- The name to set.
-
setWhitelist
public void setWhitelist(Collection<Role> whitelist)
Sets the whitelist of the custom emoji.- Parameters:
whitelist
- The whitelist to set.
-
getServer
public Server getServer()
- Specified by:
getServer
in interfaceKnownCustomEmoji
-
delete
public CompletableFuture<Void> delete(String reason)
- Specified by:
delete
in interfaceKnownCustomEmoji
-
getWhitelistedRoles
public Optional<Collection<Role>> getWhitelistedRoles()
- Specified by:
getWhitelistedRoles
in interfaceKnownCustomEmoji
-
requiresColons
public boolean requiresColons()
- Specified by:
requiresColons
in interfaceKnownCustomEmoji
-
isManaged
public boolean isManaged()
- Specified by:
isManaged
in interfaceKnownCustomEmoji
-
getCreator
public CompletableFuture<Optional<User>> getCreator()
- Specified by:
getCreator
in interfaceKnownCustomEmoji
-
toString
public String toString()
- Overrides:
toString
in classCustomEmojiImpl
-
-