From def930115f81894915c07d855805628a1a2a3920 Mon Sep 17 00:00:00 2001 From: MathMan05 Date: Fri, 16 Aug 2024 22:21:38 -0500 Subject: [PATCH] fix a few bugs --- .dist/message.js | 4 ++-- .dist/user.js | 4 ++-- webpage/message.ts | 4 ++-- webpage/user.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.dist/message.js b/.dist/message.js index c6c961b..7fe4a17 100644 --- a/.dist/message.js +++ b/.dist/message.js @@ -277,7 +277,7 @@ class Message { const combine = (premessage?.author?.snowflake != this.author.snowflake) || (current) || this.message_reference; if (combine) { const pfp = this.author.buildpfp(); - this.author.bind(pfp); + this.author.bind(pfp, this.guild); pfpRow.appendChild(pfp); } else { @@ -354,7 +354,7 @@ class Message { texttxt.appendChild(messaged); const username = document.createElement("span"); username.textContent = this.author.username; - this.author.profileclick(username); + //this.author.profileclick(username); this.author.bind(username, this.guild); texttxt.appendChild(username); username.classList.add("username"); diff --git a/.dist/user.js b/.dist/user.js index c2dca11..acbcda9 100644 --- a/.dist/user.js +++ b/.dist/user.js @@ -201,7 +201,7 @@ class User { createjankpromises() { new Promise(_ => { }); } - async buildprofile(x, y, guild) { + async buildprofile(x, y, guild = null) { if (Contextmenu.currentmenu != "") { Contextmenu.currentmenu.remove(); } @@ -258,7 +258,7 @@ class User { userbody.appendChild(rule); const biohtml = this.bio.makeHTML(); userbody.appendChild(biohtml); - { + if (guild) { Member.resolveMember(this, guild).then(member => { if (!member) return; diff --git a/webpage/message.ts b/webpage/message.ts index e84dc41..4848852 100644 --- a/webpage/message.ts +++ b/webpage/message.ts @@ -280,7 +280,7 @@ class Message{ const combine=(premessage?.author?.snowflake!=this.author.snowflake)||(current)||this.message_reference if(combine){ const pfp=this.author.buildpfp(); - this.author.bind(pfp); + this.author.bind(pfp,this.guild); pfpRow.appendChild(pfp); }else{ div["pfpparent"]=pfpparent; @@ -358,7 +358,7 @@ class Message{ const username=document.createElement("span"); username.textContent=this.author.username; - this.author.profileclick(username); + //this.author.profileclick(username); this.author.bind(username,this.guild); texttxt.appendChild(username); username.classList.add("username"); diff --git a/webpage/user.ts b/webpage/user.ts index 4e9f3d4..c99fd2d 100644 --- a/webpage/user.ts +++ b/webpage/user.ts @@ -202,7 +202,7 @@ class User{ createjankpromises(){ new Promise(_=>{}) } - async buildprofile(x:number,y:number,guild:Guild){ + async buildprofile(x:number,y:number,guild:Guild=null){ if(Contextmenu.currentmenu!=""){ Contextmenu.currentmenu.remove(); } @@ -263,7 +263,7 @@ class User{ userbody.appendChild(rule); const biohtml=this.bio.makeHTML(); userbody.appendChild(biohtml); - { + if(guild){ Member.resolveMember(this,guild).then(member=>{ if(!member) return; const roles=document.createElement("div");