fix a few bugs

This commit is contained in:
MathMan05 2024-08-16 22:21:38 -05:00
parent 81dd5516b5
commit def930115f
4 changed files with 8 additions and 8 deletions

View file

@ -277,7 +277,7 @@ class Message {
const combine = (premessage?.author?.snowflake != this.author.snowflake) || (current) || this.message_reference; const combine = (premessage?.author?.snowflake != this.author.snowflake) || (current) || this.message_reference;
if (combine) { if (combine) {
const pfp = this.author.buildpfp(); const pfp = this.author.buildpfp();
this.author.bind(pfp); this.author.bind(pfp, this.guild);
pfpRow.appendChild(pfp); pfpRow.appendChild(pfp);
} }
else { else {
@ -354,7 +354,7 @@ class Message {
texttxt.appendChild(messaged); texttxt.appendChild(messaged);
const username = document.createElement("span"); const username = document.createElement("span");
username.textContent = this.author.username; username.textContent = this.author.username;
this.author.profileclick(username); //this.author.profileclick(username);
this.author.bind(username, this.guild); this.author.bind(username, this.guild);
texttxt.appendChild(username); texttxt.appendChild(username);
username.classList.add("username"); username.classList.add("username");

View file

@ -201,7 +201,7 @@ class User {
createjankpromises() { createjankpromises() {
new Promise(_ => { }); new Promise(_ => { });
} }
async buildprofile(x, y, guild) { async buildprofile(x, y, guild = null) {
if (Contextmenu.currentmenu != "") { if (Contextmenu.currentmenu != "") {
Contextmenu.currentmenu.remove(); Contextmenu.currentmenu.remove();
} }
@ -258,7 +258,7 @@ class User {
userbody.appendChild(rule); userbody.appendChild(rule);
const biohtml = this.bio.makeHTML(); const biohtml = this.bio.makeHTML();
userbody.appendChild(biohtml); userbody.appendChild(biohtml);
{ if (guild) {
Member.resolveMember(this, guild).then(member => { Member.resolveMember(this, guild).then(member => {
if (!member) if (!member)
return; return;

View file

@ -280,7 +280,7 @@ class Message{
const combine=(premessage?.author?.snowflake!=this.author.snowflake)||(current)||this.message_reference const combine=(premessage?.author?.snowflake!=this.author.snowflake)||(current)||this.message_reference
if(combine){ if(combine){
const pfp=this.author.buildpfp(); const pfp=this.author.buildpfp();
this.author.bind(pfp); this.author.bind(pfp,this.guild);
pfpRow.appendChild(pfp); pfpRow.appendChild(pfp);
}else{ }else{
div["pfpparent"]=pfpparent; div["pfpparent"]=pfpparent;
@ -358,7 +358,7 @@ class Message{
const username=document.createElement("span"); const username=document.createElement("span");
username.textContent=this.author.username; username.textContent=this.author.username;
this.author.profileclick(username); //this.author.profileclick(username);
this.author.bind(username,this.guild); this.author.bind(username,this.guild);
texttxt.appendChild(username); texttxt.appendChild(username);
username.classList.add("username"); username.classList.add("username");

View file

@ -202,7 +202,7 @@ class User{
createjankpromises(){ createjankpromises(){
new Promise(_=>{}) new Promise(_=>{})
} }
async buildprofile(x:number,y:number,guild:Guild){ async buildprofile(x:number,y:number,guild:Guild=null){
if(Contextmenu.currentmenu!=""){ if(Contextmenu.currentmenu!=""){
Contextmenu.currentmenu.remove(); Contextmenu.currentmenu.remove();
} }
@ -263,7 +263,7 @@ class User{
userbody.appendChild(rule); userbody.appendChild(rule);
const biohtml=this.bio.makeHTML(); const biohtml=this.bio.makeHTML();
userbody.appendChild(biohtml); userbody.appendChild(biohtml);
{ if(guild){
Member.resolveMember(this,guild).then(member=>{ Member.resolveMember(this,guild).then(member=>{
if(!member) return; if(!member) return;
const roles=document.createElement("div"); const roles=document.createElement("div");