Interface EmojiSource
- All Superinterfaces:
Implementation.ExtensionProvidable
Emojis loaded from an implementation of EmojiSource are automatically registered upon startup.
Per default all emojis contained in the directory "emojis" in the resource folder are registered automatically.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic EmojiSourceLoads an emoji from a givenIconinstance, allowing interop with JDAs systemstatic EmojiSourceLoads an emoji from a given URL.get()This method is called during startup to load the to be registered application emojis.static EmojiSourcereflective(String... paths) This implementation ofEmojiSourcescans the classpath for emoji files under the given paths.
-
Field Details
-
RESOURCE_PATTERN
-
log
static final org.slf4j.Logger log
-
-
Method Details
-
reflective
This implementation of
EmojiSourcescans the classpath for emoji files under the given paths. (resource directory names) The file name will be used as the emoji name.If no path is passed as an argument, the default path "emojis" will be used.
- Parameters:
paths- the paths to scan (resource directories)
-
fromUrl
Loads an emoji from a given URL.- Parameters:
name- the name of the emojiurl- theURLthe emoji should be loaded from
-
fromIcon
-
get
-