From d73146e5d43e0d7b35fee004703ce3c3f775b9aa Mon Sep 17 00:00:00 2001 From: MathMan05 Date: Fri, 26 Jun 2026 22:46:34 -0500 Subject: [PATCH] don't load categories --- src/webpage/localuser.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/webpage/localuser.ts b/src/webpage/localuser.ts index 4b7c147..940cf76 100644 --- a/src/webpage/localuser.ts +++ b/src/webpage/localuser.ts @@ -1339,7 +1339,7 @@ class Localuser { } } } - createChannel(json: channeljson): undefined | Channel { + async createChannel(json: channeljson): undefined | Channel { const c = this.channels.get(json.id); if (c) { c.updateChannel(json); @@ -1355,11 +1355,12 @@ class Localuser { } if (channel.id === this.gotoid) { guild.loadGuild(); - guild.loadChannel(channel.id).then(() => { - this.gotoRes(); - this.gotoRes = () => {}; - this.gotoid = undefined; - }); + if (channel?.type !== 4) { + await guild.loadChannel(channel.id); + } + this.gotoRes(); + this.gotoRes = () => {}; + this.gotoid = undefined; } return channel; // Add this line to return the 'channel' variable } @@ -1675,6 +1676,7 @@ class Localuser { gotoRes = () => {}; async goToChannel(channelid: string, addstate = true, messageid: undefined | string = undefined) { const channel = this.channels.get(channelid); + if (channel?.type === 4) return; if (channel) { const guild = channel.guild; guild.loadGuild();