public interface Emote extends ISnowflake, IMentionable, IFakeable
Modifier and Type | Method and Description |
---|---|
default boolean |
canInteract(Member issuer)
Whether the specified Member can interact with this Emote
|
default boolean |
canInteract(User issuer,
MessageChannel channel)
Whether the specified Member can interact with this Emote within the provided MessageChannel
|
RestAction<java.lang.Void> |
delete()
Deletes this Emote.
|
default java.lang.String |
getAsMention()
|
Guild |
getGuild()
Guild this emote is attached to. |
default java.lang.String |
getImageUrl()
A String representation of the URL which leads to image displayed within the official Discord™ client
when this Emote is used
|
JDA |
getJDA()
The
JDA instance of this Emote |
EmoteManager |
getManager()
The
Manager for this emote |
EmoteManagerUpdatable |
getManagerUpdatable()
An updatable manager for this Emote.
|
java.lang.String |
getName()
The name of this emote
|
java.util.List<Role> |
getRoles()
Roles this emote is active for (source)
|
boolean |
isManaged()
Whether this emote is managed (source)
|
getCreationTime, getId
Guild getGuild()
Guild
this emote is attached to.This is null if the emote is fake (retrieved from a Message)
java.util.List<Role> getRoles()
java.lang.IllegalStateException
- if this emotes is fakejava.lang.String getName()
boolean isManaged()
RestAction<java.lang.Void> delete()
RestAction
- Void
java.lang.IllegalStateException
- if this Emote is fakePermissionException
- if the Permission MANAGE_EMOTES
is not givenAccountTypeException
- if the current account is not from AccountType#CLIENT
EmoteManager getManager()
Manager
for this emote
This will only work for the client account type.
With the EmoteManager returned you can modify this Emote's properties or delete it.
AccountTypeException
- if this is not used with AccountType#CLIENT
java.lang.IllegalStateException
- if this emote is fakeEmoteManagerUpdatable getManagerUpdatable()
This will only work for the client account type.
With the EmoteManager returned you can modify this Emote's properties or delete it.
This specific Manager is used to modify multiple properties at once by setting the property and calling EmoteManagerUpdatable.update()
AccountTypeException
- if this is not used with AccountType#CLIENT
java.lang.IllegalStateException
- if this emote is fakedefault java.lang.String getImageUrl()
default java.lang.String getAsMention()
<:getName()
:getId()
>
getAsMention
in interface IMentionable
default boolean canInteract(Member issuer)
issuer
- The User to testPermissionUtil.canInteract(Member, Emote)
,
PermissionUtil.canInteract(User, Emote, MessageChannel)
default boolean canInteract(User issuer, MessageChannel channel)
issuer
- The User to testchannel
- The MessageChannel to testPermissionUtil.canInteract(Member, Emote)
,
PermissionUtil.canInteract(User, Emote, MessageChannel)