Adds sorting of DMs
Adds support for sortings of DMs and inital work for unread messages along with a function to work arround an error in spacebar's API
This commit is contained in:
parent
b4ef272c2e
commit
9676c605e7
5 changed files with 67 additions and 3 deletions
|
@ -21,8 +21,20 @@ class localuser{
|
|||
const temp=new member(thing[0]);
|
||||
this.guildids[temp.guild_id].giveMember(temp);
|
||||
}
|
||||
for(const thing of ready.d.read_state.entries){
|
||||
console.log(thing)
|
||||
thing.id=this.resolveGuildidFromChannelID(thing.channel_id);//currently needed due to broken server code, remove once id is the guild id
|
||||
this.guildids[thing.id].channelids[thing.channel_id].readStateInfo(thing);
|
||||
}
|
||||
this.typing=[];
|
||||
}
|
||||
resolveGuildidFromChannelID(ID){
|
||||
for(const thing of this.guilds){
|
||||
if(thing.channelids[ID]){
|
||||
return thing.id;
|
||||
}
|
||||
}
|
||||
}
|
||||
updateChannel(JSON){
|
||||
this.guildids[JSON.guild_id].updateChannel(JSON);
|
||||
if(JSON.guild_id===this.lookingguild.id){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue