updates to local

This commit is contained in:
MathMan05
2024-07-25 12:07:57 -05:00
parent 71c281ec2b
commit 0cbc1a7910
6 changed files with 67 additions and 70 deletions

View File

@@ -397,8 +397,8 @@ class Guild {
loadGuild() {
this.localuser.loadGuild(this.id);
}
updateChannel(JSON) {
SnowFlake.getSnowFlakeFromID(JSON.id, Channel).getObject().updateChannel(JSON);
updateChannel(json) {
SnowFlake.getSnowFlakeFromID(json.id, Channel).getObject().updateChannel(json);
this.headchannels = [];
for (const thing of this.channels) {
thing.children = [];
@@ -410,9 +410,9 @@ class Guild {
}
this.printServers();
}
createChannelpac(JSON) {
const thischannel = new Channel(JSON, this);
this.channelids[JSON.id] = thischannel;
createChannelpac(json) {
const thischannel = new Channel(json, this);
this.channelids[json.id] = thischannel;
this.channels.push(thischannel);
thischannel.resolveparent(this);
if (!thischannel.parent) {
@@ -461,9 +461,9 @@ class Guild {
]);
channelselect.show();
}
delChannel(JSON) {
const channel = this.channelids[JSON.id];
delete this.channelids[JSON.id];
delChannel(json) {
const channel = this.channelids[json.id];
delete this.channelids[json.id];
this.channels.splice(this.channels.indexOf(channel), 1);
const indexy = this.headchannels.indexOf(channel);
if (indexy !== -1) {
@@ -478,7 +478,7 @@ class Guild {
}else{
console.log("fail");
if(thing.parent){
thing.parent.delChannel(JSON);
thing.parent.delChannel(json);
}
}
}