local emoji = require(path.to.emoji)
print(emoji("emojis are :ok_hand:!"))
-- output: emojis are 👌!
emoji()
takes an optional second argument for the skin tone. Available skin tones are
emoji.Light
emoji.Dark
emoji.MediumLight
emoji.MediumDark
emoji.Medium
Several aliases can be used for each emoji depending on your preferences:
print(emoji(":thumbs_up: = :thumbs-up: = :thumbsup:"))
-- output: 👍 = 👍 = 👍
lua-emoji also allows you to use ISO country codes from https://countrycode.org/ for flags.
All the code is in one module, so you can install it by downloading the emoji.lua
file from the GitHub repository and inserting it in your game.
The emoji list is generated from Taehoon Kim's emoji for Python.