Notification support
Be warned, there's either a bug in the server or notification level setting isn't implemented on the server side
This commit is contained in:
parent
0d5e4fc94b
commit
31f3fef52d
5 changed files with 141 additions and 0 deletions
|
@ -47,11 +47,36 @@ class cmessage{
|
|||
this.embeds[thing]=new embed(this.embeds[thing],this);
|
||||
}
|
||||
this.author=new user(this.author);
|
||||
for(const thing in this.mentions){
|
||||
this.mentions[thing]=new user(this.mentions[thing]);
|
||||
}
|
||||
if(this.mentions.length||this.mention_roles.length){//currently mention_roles isn't implemented on the spacebar servers
|
||||
console.log(this.mentions,this.mention_roles)
|
||||
}
|
||||
if(this.mentionsuser(this.owner.owner.owner.user)){
|
||||
console.log(this);
|
||||
}
|
||||
}
|
||||
messageevents(obj){
|
||||
cmessage.contextmenu.bind(obj,this)
|
||||
obj.classList.add("messagediv")
|
||||
}
|
||||
mentionsuser(userd){
|
||||
if(userd instanceof user){
|
||||
return this.mentions.includes(userd);
|
||||
}else if(userd instanceof member){
|
||||
return this.mentions.includes(userd.user);
|
||||
}
|
||||
}
|
||||
getimages(){
|
||||
const build=[];
|
||||
for(const thing of this.attachments){
|
||||
if(thing.content_type.startsWith('image/')){
|
||||
build.push(thing);
|
||||
}
|
||||
}
|
||||
return build;
|
||||
}
|
||||
buildhtml(premessage){
|
||||
//premessage??=messages.lastChild;
|
||||
const build = document.createElement('table');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue