custom emoji reaction rendering support
This commit is contained in:
@@ -10,7 +10,6 @@ import {File} from "./file.js";
|
||||
import { SnowFlake } from "./snowflake.js";
|
||||
import { messagejson } from "./jsontypes.js";
|
||||
import {Emoji} from "./emoji.js";
|
||||
new Emoji();
|
||||
|
||||
class Message{
|
||||
static contextmenu=new Contextmenu("message menu");
|
||||
@@ -387,9 +386,14 @@ class Message{
|
||||
if(thing.me){
|
||||
reaction.classList.add("meReacted")
|
||||
}
|
||||
const emoji=document.createElement("p");
|
||||
emoji.textContent=thing.emoji.name;
|
||||
|
||||
let emoji:HTMLElement;
|
||||
if(thing.emoji.id){
|
||||
const emo=new Emoji(thing.emoji as {name:string,id:string,animated:boolean},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");
|
||||
|
Reference in New Issue
Block a user