upgraded DMs, and fixed bugs

This commit is contained in:
MathMan05 2024-09-07 17:35:15 -05:00
parent 1502dbec17
commit 512cc95ab4
15 changed files with 161 additions and 72 deletions

View file

@ -495,10 +495,31 @@ class Localuser {
const guild = this.guildids.get(json.guild_id);
if (!guild)
return;
guild.createChannelpac(json);
const channel = guild.createChannelpac(json);
if (json.guild_id === this.lookingguild?.id) {
this.loadGuild(json.guild_id);
}
if (channel.id === this.gotoid) {
guild.loadGuild();
guild.loadChannel(channel.id);
this.gotoid = undefined;
}
}
gotoid;
async goToChannel(id) {
let guild;
for (const thing of this.guilds) {
if (thing.channelids[id]) {
guild = thing;
}
}
if (guild) {
guild.loadGuild();
guild.loadChannel(id);
}
else {
this.gotoid = id;
}
}
delChannel(json) {
let guild_id = json.guild_id;