Class EmojiResolver
java.lang.Object
io.github.kaktushose.jdac.message.emoji.EmojiResolver
The EmojiResolver replaces emoji aliases in strings with their formatted value.
An emoji alias is just the discord alias (either Unicode oder app emoji)
enclosed by a colon :. For example the Unicode alias :joy: will be replaced by 😂 and the
app emoji :app_emote: by its uploaded file.
Normally it shouldn't be necessary to escape the colons in messages (that shouldn't be an emoji alias), but in case any troubles occur you can
just prefix it with \ (in java \\) to escape it.
Supported are all discord emojis, their skin tone variants and the app emotes for this bot. App emotes with the same name as a Unicode one will override later.
-
Constructor Summary
ConstructorsConstructorDescriptionEmojiResolver(Collection<ApplicationEmoji> applicationEmojis) Constructs a new instance ofEmojiResolverwith the given application emojis and all Unicode emojis supported by discord. -
Method Summary
-
Constructor Details
-
EmojiResolver
Constructs a new instance ofEmojiResolverwith the given application emojis and all Unicode emojis supported by discord. If one of the passed application emojis has the same alias as a Unicode emoji, the app emojis takes precedence.- Parameters:
applicationEmojis- a list of all application emojis of this bot
-
-
Method Details
-
resolve
-