various fixes
This commit is contained in:
parent
ab842f8f9b
commit
ee9483f350
6 changed files with 20 additions and 18 deletions
|
@ -233,12 +233,14 @@ class Channel extends SnowFlake{
|
|||
if(thing.id==="1182819038095799904"||thing.id==="1182820803700625444"){
|
||||
continue;
|
||||
}
|
||||
this.permission_overwrites.set(thing.id,new Permissions(thing.allow,thing.deny));
|
||||
const permission=this.permission_overwrites.get(thing.id);
|
||||
if(permission){
|
||||
const role=this.guild.roleids.get(thing.id);
|
||||
if(role){
|
||||
this.permission_overwritesar.push([role,permission]);
|
||||
if(!this.permission_overwrites.has(thing.id)){//either a bug in the server requires this, or the API is cursed
|
||||
this.permission_overwrites.set(thing.id,new Permissions(thing.allow,thing.deny));
|
||||
const permission=this.permission_overwrites.get(thing.id);
|
||||
if(permission){
|
||||
const role=this.guild.roleids.get(thing.id);
|
||||
if(role){
|
||||
this.permission_overwritesar.push([role,permission]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -295,7 +297,7 @@ class Channel extends SnowFlake{
|
|||
return true;
|
||||
}
|
||||
for(const thing of member.roles){
|
||||
const premission=this.permission_overwrites.get(thing.id);
|
||||
let premission=this.permission_overwrites.get(thing.id);
|
||||
if(premission){
|
||||
const perm=premission.getPermission(name);
|
||||
if(perm){
|
||||
|
@ -665,7 +667,6 @@ class Channel extends SnowFlake{
|
|||
const id=++Channel.genid;
|
||||
if(this.localuser.channelfocus){
|
||||
this.localuser.channelfocus.infinite.delete();
|
||||
this.localuser.channelfocus=this;
|
||||
}
|
||||
if(this.guild!==this.localuser.lookingguild){
|
||||
this.guild.loadGuild();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue