don't load categories

This commit is contained in:
MathMan05
2026-06-26 22:46:34 -05:00
parent 0219ebfd37
commit d73146e5d4
+8 -6
View File
@@ -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();