make MarkDown into a class and fixed emojis
This commit is contained in:
parent
36fc3fecc2
commit
ec5b86b276
12 changed files with 957 additions and 848 deletions
|
@ -1,6 +1,6 @@
|
|||
//const usercache={};
|
||||
import {Member} from "./member.js";
|
||||
import {markdown} from "./markdown.js";
|
||||
import {MarkDown} from "./markdown.js";
|
||||
import {Contextmenu} from "./contextmenu.js";
|
||||
import {Localuser} from "./localuser.js";
|
||||
import {Guild} from "./guild.js";
|
||||
|
@ -12,7 +12,7 @@ class User{
|
|||
id:string;
|
||||
avatar:string;
|
||||
username:string;
|
||||
bio:string;
|
||||
bio:MarkDown;
|
||||
discriminator:string;
|
||||
pronouns:string;
|
||||
bot:boolean;
|
||||
|
@ -49,6 +49,10 @@ class User{
|
|||
if(!owner){console.error("missing localuser")}
|
||||
if(dontclone){
|
||||
for(const thing of Object.keys(userjson)){
|
||||
if(thing==="bio"){
|
||||
this.bio=new MarkDown(userjson[thing],this.localuser);
|
||||
continue;
|
||||
}
|
||||
this[thing]=userjson[thing];
|
||||
}
|
||||
this.hypotheticalpfp=false;
|
||||
|
@ -152,7 +156,7 @@ class User{
|
|||
|
||||
const rule=document.createElement("hr");
|
||||
userbody.appendChild(rule);
|
||||
const biohtml=markdown(this.bio);
|
||||
const biohtml=this.bio.makeHTML();
|
||||
userbody.appendChild(biohtml);
|
||||
}
|
||||
console.log(div);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue