2022-08-12 14:36:19 +01:00
|
|
|
const names = {
|
|
|
|
"🎶": "musical_notes",
|
|
|
|
"🎬": "clapper_board",
|
|
|
|
"💰": "money_bag",
|
|
|
|
"🎉": "party_popper",
|
2023-01-29 18:17:33 +00:00
|
|
|
"❓": "question_mark",
|
2022-08-12 14:36:19 +01:00
|
|
|
"✨": "sparkles",
|
|
|
|
"🪅": "pinata",
|
|
|
|
"🪄": "magic_wand",
|
2022-09-11 16:04:06 +01:00
|
|
|
"🐲": "dragon_face",
|
2022-10-27 17:27:20 +01:00
|
|
|
"🀄": "dragon_face_wukko",
|
2022-08-12 14:36:19 +01:00
|
|
|
"💸": "money_with_wings",
|
2022-08-19 18:54:20 +01:00
|
|
|
"⚙️": "gear",
|
2022-09-08 17:02:55 +01:00
|
|
|
"☹️": "frowning_face",
|
2022-10-27 17:27:20 +01:00
|
|
|
"📋": "clipboard",
|
|
|
|
"🎃": "pumpkin",
|
|
|
|
"🎄": "christmas_tree",
|
|
|
|
"🕯️": "candle",
|
|
|
|
"😺": "cat",
|
2022-11-20 13:46:08 +00:00
|
|
|
"🐶": "dog",
|
2023-01-29 18:17:33 +00:00
|
|
|
"🎂": "cake",
|
|
|
|
"🐘": "elephant",
|
|
|
|
"🐦": "bird",
|
|
|
|
"🐙": "octopus",
|
2023-03-08 07:17:33 +00:00
|
|
|
"🔮": "crystal_ball",
|
|
|
|
"💪": "biceps"
|
2022-08-12 14:36:19 +01:00
|
|
|
}
|
|
|
|
let sizing = {
|
|
|
|
22: 0.4,
|
2022-08-19 18:54:20 +01:00
|
|
|
30: 0.7,
|
2023-01-29 18:17:33 +00:00
|
|
|
48: 0.9,
|
|
|
|
64: 0.9
|
2022-08-12 14:36:19 +01:00
|
|
|
}
|
|
|
|
export default function(emoji, size, disablePadding) {
|
|
|
|
if (!size) size = 22;
|
2022-10-24 14:03:11 +01:00
|
|
|
let padding = size !== 22 ? `margin-right:${sizing[size] ? sizing[size] : "0.4"}rem;` : ``;
|
2022-08-12 14:36:19 +01:00
|
|
|
if (disablePadding) padding = 'margin-right:0!important;';
|
|
|
|
if (!names[emoji]) emoji = "❓";
|
2023-01-29 18:17:33 +00:00
|
|
|
return `<img class="emoji" draggable=false height="${size}" width="${size}" style="${padding}" alt="${emoji}" src="emoji/${names[emoji]}.svg">`
|
2022-08-12 14:36:19 +01:00
|
|
|
}
|