more bug fixes

This commit is contained in:
MathMan05 2024-05-28 11:18:05 -05:00
parent 8e89e9929b
commit cbf657afeb
2 changed files with 38 additions and 21 deletions

View file

@ -24,15 +24,18 @@ class localuser{
}
for(const thing of ready.d.read_state.entries){
console.log(thing)
const guildid=this.resolveGuildidFromChannelID(thing.id).id;
const guild=this.resolveGuildidFromChannelID(thing.id)
if(guild===undefined){
continue
}
const guildid=guild.id;
this.guildids[guildid].channelids[thing.channel_id].readStateInfo(thing);
}
this.typing=[];
}
resolveGuildidFromChannelID(ID){
const resolve=this.guilds.find(guild => guild.channelids[ID])
resolve??={};
console.error("Failed to resolve "+ID);
resolve??=undefined;
return resolve;
}
updateChannel(JSON){