lazy
Lazily retrieves an emoji named emojiName, created from the assetPattern found in the basePath
of your class.
The basePath
is taken from the first @AppEmojiContainer found in the call stack, typically the caller of this function.
This cannot be used alongside non-lazy methods (get and getValue).
Parameters
The glob pattern which matches a single file, includes the extension
The name of the emoji uploaded on Discord, defaults to assetPattern without its extension and converted from camelCase
to snake_case
, must be between 2 and EMOJI_NAME_MAX_LENGTH and only have alphanumerics with dashes
Throws
If @AppEmojiContainer is not found in the call stack
If emojiName has invalid characters
If an emoji with the same name was already registered
If the emojis were already loaded
Lazily retrieves an emoji named emojiName, created from the assetPattern found in the basePath.
This cannot be used alongside non-lazy methods (get and getValue).
Parameters
Path at which the file can be searched in; must start with a /
and NOT end with a /
The glob pattern which matches a single file, includes the extension
The name of the emoji uploaded on Discord, defaults to assetPattern without its extension and converted from camelCase
to snake_case
, must be between 2 and EMOJI_NAME_MAX_LENGTH and only have alphanumerics with dashes
Throws
If emojiName has invalid characters
If an emoji with the same name was already registered
If the emojis were already loaded
Lazily retrieves an application emoji for the current property.
This function registers the emoji with the following values, which can be overridden:
The basePath is taken from the @AppEmojiContainer
The assetPattern is the property name, converted to
snake_case
The emojiName is the property name, converted to
snake_case
This cannot be used alongside non-lazy methods (get and getValue).
Parameters
Property from which to take the base path, asset name and emoji name, must be the current property
Path at which the file can be searched in; must start with a /
and NOT end with a /
The glob pattern which matches a single file, includes the extension
The name of the emoji uploaded on Discord, defaults to assetPattern without its extension and converted from camelCase
to snake_case
, must be between 2 and EMOJI_NAME_MAX_LENGTH and only have alphanumerics with dashes