public class EmoteDecoratorButton extends DecoratorButton
onTrigger
KEY_ACTION_FUNCTIONAL, KEY_ACTION_SCRIPT, KEY_BINDING_CHANNEL_ID, KEY_BINDING_ID, KEY_CLASS, KEY_CLASS_UNDERLYING, KEY_DELETE_AFTER, KEY_EMOTE, KEY_POLL_VOTE_ACTION, KEY_POLL_VOTES, KEY_TIMEOUT, KEY_TIMEOUT_ACTION
Constructor and Description |
---|
EmoteDecoratorButton(net.dv8tion.jda.core.entities.Emote emote,
com.jesus_crie.modularbot.core.utils.SerializableConsumer<net.dv8tion.jda.core.events.message.react.GenericMessageReactionEvent> onTrigger) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkEmote(net.dv8tion.jda.core.events.message.react.GenericMessageReactionEvent event)
Used to check if an is eligible for this button.
|
java.lang.String |
getEmoteSerialized()
Return a serialized version of the emote corresponding to this button.
|
net.dv8tion.jda.core.entities.MessageReaction.ReactionEmote |
getReactionEmote()
Get a
ReactionEmote representing the associated
emote. |
net.dv8tion.jda.core.requests.RestAction<java.lang.Void> |
removeEmote(net.dv8tion.jda.core.entities.Message target)
Called when the decorator is destroying and need to remove the reactions.
|
net.dv8tion.jda.core.requests.RestAction<java.lang.Void> |
setupEmote(net.dv8tion.jda.core.entities.Message target)
Called when the decorator is initializing.
|
fromReactionEmote, getActionSerializable, onTrigger, serialize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deserializeReactionEmote, getBinding
public EmoteDecoratorButton(@Nonnull net.dv8tion.jda.core.entities.Emote emote, @Nullable com.jesus_crie.modularbot.core.utils.SerializableConsumer<net.dv8tion.jda.core.events.message.react.GenericMessageReactionEvent> onTrigger)
@Nonnull public net.dv8tion.jda.core.requests.RestAction<java.lang.Void> setupEmote(@Nonnull net.dv8tion.jda.core.entities.Message target)
DecoratorButton
setupEmote
in class DecoratorButton
target
- The target message.RestAction
that will add the emote to the message when executed.@Nonnull public net.dv8tion.jda.core.requests.RestAction<java.lang.Void> removeEmote(@Nonnull net.dv8tion.jda.core.entities.Message target)
DecoratorButton
removeEmote
in class DecoratorButton
target
- The target message.RestAction
that will remove the emote from the target message.protected boolean checkEmote(@Nonnull net.dv8tion.jda.core.events.message.react.GenericMessageReactionEvent event)
DecoratorButton
checkEmote
in class DecoratorButton
event
- The event to check.@Nonnull public java.lang.String getEmoteSerialized()
DecoratorButton
getEmoteSerialized
in class DecoratorButton
@Nonnull public net.dv8tion.jda.core.entities.MessageReaction.ReactionEmote getReactionEmote()
DecoratorButton
ReactionEmote
representing the associated
emote.getReactionEmote
in class DecoratorButton
ReactionEmote
.