custom emoji reaction rendering support

This commit is contained in:
MathMan05 2024-08-11 18:26:59 -05:00
parent 95942c7f50
commit a748e923fd
7 changed files with 107 additions and 29 deletions

View file

@ -6,7 +6,6 @@ import { Embed } from "./embed.js";
import { File } from "./file.js";
import { SnowFlake } from "./snowflake.js";
import { Emoji } from "./emoji.js";
new Emoji();
class Message {
static contextmenu = new Contextmenu("message menu");
owner;
@ -383,8 +382,15 @@ class Message {
if (thing.me) {
reaction.classList.add("meReacted");
}
const emoji = document.createElement("p");
emoji.textContent = thing.emoji.name;
let emoji;
if (thing.emoji.id) {
const emo = new Emoji(thing.emoji, this.guild);
emoji = emo.getHTML(false);
}
else {
emoji = document.createElement("p");
emoji.textContent = thing.emoji.name;
}
const count = document.createElement("p");
count.textContent = "" + thing.count;
count.classList.add("reactionCount");