Package com.github.ygimenez.type
Enum Emote
- All Implemented Interfaces:
Serializable,Comparable<Emote>,java.lang.constant.Constable
Enumerator representing values required by non-dynamic buttons.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionEmoterepresenting the "accept" button (default: ✅).Emoterepresenting the "cancel" button (default: ❎).Emoterepresenting the "go to first" button (default: ⏮).Emoterepresenting the "go to last" button (default: ⏭).Emoterepresenting the "next" button (default: ▶).Emoterepresenting nothing.Emoterepresenting the "previous" button (default: ◀).Emoterepresenting the "skip backward" button (default: ⏪).Emoterepresenting the "skip forward" button (default: ⏩). -
Method Summary
Modifier and TypeMethodDescriptionstatic EmotefromButton(net.dv8tion.jda.api.interactions.components.buttons.Button btn)Returns theEmoterepresented by the suppliedButton, if any.static EmotegetByEmoji(net.dv8tion.jda.api.entities.emoji.Emoji emoji)Retrieves theEmotelinked to suppliedEmoji.net.dv8tion.jda.api.entities.emoji.EmojiRetrieves thisEmote's defaultEmoji.static StringgetId(net.dv8tion.jda.api.entities.emoji.Emoji emj)Utility method for retrieving anEmoji's effective ID.net.dv8tion.jda.api.interactions.components.buttons.ButtonStylegetStyle()Retrieves thisEmote'sButtonStyle.static booleanisNative(net.dv8tion.jda.api.entities.MessageReaction react)Checks whether the suppliedMessageReactionis referenced by a library emote or not.static booleanisNative(net.dv8tion.jda.api.interactions.components.buttons.Button btn)Checks whether the suppliedButtonis referenced by a library emote or not.static EmoteReturns the enum constant of this type with the specified name.static Emote[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NEXT
Emoterepresenting the "next" button (default: ▶). -
PREVIOUS
Emoterepresenting the "previous" button (default: ◀). -
ACCEPT
Emoterepresenting the "accept" button (default: ✅). -
CANCEL
Emoterepresenting the "cancel" button (default: ❎). -
SKIP_FORWARD
Emoterepresenting the "skip forward" button (default: ⏩). -
SKIP_BACKWARD
Emoterepresenting the "skip backward" button (default: ⏪). -
GOTO_FIRST
Emoterepresenting the "go to first" button (default: ⏮). -
GOTO_LAST
Emoterepresenting the "go to last" button (default: ⏭). -
NONE
Emoterepresenting nothing.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getDefault
public net.dv8tion.jda.api.entities.emoji.Emoji getDefault()Retrieves thisEmote's defaultEmoji.- Returns:
- This
Emote's defaultEmoji.
-
getStyle
public net.dv8tion.jda.api.interactions.components.buttons.ButtonStyle getStyle()Retrieves thisEmote'sButtonStyle.- Returns:
- This
Emote'sButtonStyle.
-
getByEmoji
Retrieves theEmotelinked to suppliedEmoji. -
isNative
public static boolean isNative(@NotNull net.dv8tion.jda.api.interactions.components.buttons.Button btn)Checks whether the suppliedButtonis referenced by a library emote or not.- Parameters:
btn- TheButtonto be checked.- Returns:
- Whether it uses a
Emotevalue or not.
-
isNative
public static boolean isNative(@NotNull net.dv8tion.jda.api.entities.MessageReaction react)Checks whether the suppliedMessageReactionis referenced by a library emote or not.- Parameters:
react- TheMessageReactionto be checked.- Returns:
- Whether it uses a
Emotevalue or not.
-
getId
Utility method for retrieving anEmoji's effective ID.- Parameters:
emj- TheEmojito be used.- Returns:
- The supplied
Emoji's effective ID.
-
fromButton
@Nullable public static Emote fromButton(@NotNull net.dv8tion.jda.api.interactions.components.buttons.Button btn)Returns theEmoterepresented by the suppliedButton, if any.- Parameters:
btn- TheButtonto be checked.- Returns:
- The
Emotelinked to the suppliedButton, or null if none.
-