another bug fix
This commit is contained in:
@@ -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.guild);
|
this.author.bind(pfp, this.guild, false);
|
||||||
pfpRow.appendChild(pfp);
|
pfpRow.appendChild(pfp);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@@ -155,10 +155,10 @@ class User {
|
|||||||
this.changepfp(json.avatar);
|
this.changepfp(json.avatar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bind(html, guild = null) {
|
bind(html, guild = null, error = true) {
|
||||||
if (guild && guild.id !== "@me") {
|
if (guild && guild.id !== "@me") {
|
||||||
Member.resolveMember(this, guild).then(_ => {
|
Member.resolveMember(this, guild).then(_ => {
|
||||||
if (_ === undefined) {
|
if (_ === undefined && error) {
|
||||||
const error = document.createElement("span");
|
const error = document.createElement("span");
|
||||||
error.textContent = "!";
|
error.textContent = "!";
|
||||||
error.classList.add("membererror");
|
error.classList.add("membererror");
|
||||||
|
@@ -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.guild);
|
this.author.bind(pfp,this.guild,false);
|
||||||
pfpRow.appendChild(pfp);
|
pfpRow.appendChild(pfp);
|
||||||
}else{
|
}else{
|
||||||
div["pfpparent"]=pfpparent;
|
div["pfpparent"]=pfpparent;
|
||||||
|
@@ -155,10 +155,10 @@ class User{
|
|||||||
this.changepfp(json.avatar);
|
this.changepfp(json.avatar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bind(html:HTMLElement,guild:Guild=null){
|
bind(html:HTMLElement,guild:Guild=null,error=true){
|
||||||
if(guild&&guild.id!=="@me"){
|
if(guild&&guild.id!=="@me"){
|
||||||
Member.resolveMember(this,guild).then(_=>{
|
Member.resolveMember(this,guild).then(_=>{
|
||||||
if(_===undefined){
|
if(_===undefined&&error){
|
||||||
const error=document.createElement("span");
|
const error=document.createElement("span");
|
||||||
error.textContent="!";
|
error.textContent="!";
|
||||||
error.classList.add("membererror");
|
error.classList.add("membererror");
|
||||||
|
Reference in New Issue
Block a user