upgraded DMs, and fixed bugs
This commit is contained in:
parent
1502dbec17
commit
512cc95ab4
15 changed files with 161 additions and 72 deletions
|
@ -474,14 +474,34 @@ class Localuser{
|
|||
}
|
||||
}
|
||||
}
|
||||
createChannel(json:channeljson):void{
|
||||
createChannel(json:channeljson):undefined|Channel{
|
||||
json.guild_id??="@me";
|
||||
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:string|undefined;
|
||||
async goToChannel(id:string){
|
||||
let guild:undefined|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:channeljson):void{
|
||||
let guild_id=json.guild_id;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue