fix gulpfile and force everyone to have everyone
This commit is contained in:
parent
4128f7bd97
commit
7814d61095
2 changed files with 7 additions and 2 deletions
|
@ -89,6 +89,7 @@ gulp.task("copy-assets", () => {
|
|||
"src/**/*.png",
|
||||
"src/**/*.jpg",
|
||||
"src/**/*.jpeg",
|
||||
"src/**/*.webp",
|
||||
"src/**/*.gif",
|
||||
"src/**/*.svg",
|
||||
],{encoding:false})
|
||||
|
|
|
@ -45,7 +45,12 @@ class Member extends SnowFlake{
|
|||
}
|
||||
(this as any)[key] = (memberjson as any)[key];
|
||||
}
|
||||
|
||||
if(!this.user.bot){
|
||||
const everyone=this.guild.roleids.get(this.guild.id);
|
||||
if(everyone&&(this.roles.indexOf(everyone)===-1)){
|
||||
this.roles.push(everyone)
|
||||
}
|
||||
}
|
||||
this.roles.sort((a, b)=>{
|
||||
return this.guild.roles.indexOf(a) - this.guild.roles.indexOf(b);
|
||||
});
|
||||
|
@ -164,7 +169,6 @@ class Member extends SnowFlake{
|
|||
);
|
||||
}
|
||||
hasRole(ID: string){
|
||||
console.log(this.roles, ID);
|
||||
for(const thing of this.roles){
|
||||
if(thing.id === ID){
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue