Code / style fixes
This commit is contained in:
parent
6c3f71669d
commit
055a030c4e
1 changed files with 5 additions and 6 deletions
|
@ -163,6 +163,8 @@ export class Guild extends Base {
|
||||||
|
|
||||||
constructor(client: Client, data: GuildPayload) {
|
constructor(client: Client, data: GuildPayload) {
|
||||||
super(client, data)
|
super(client, data)
|
||||||
|
this.id = data.id
|
||||||
|
this.unavailable = data.unavailable
|
||||||
this.readFromData(data)
|
this.readFromData(data)
|
||||||
this.bans = new GuildBans(client, this)
|
this.bans = new GuildBans(client, this)
|
||||||
this.members = new MembersManager(this.client, this)
|
this.members = new MembersManager(this.client, this)
|
||||||
|
@ -298,15 +300,12 @@ export class Guild extends Base {
|
||||||
async awaitAvailability(
|
async awaitAvailability(
|
||||||
delay: number = 1000
|
delay: number = 1000
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const promise1 = new Promise((resolve, reject) => {
|
|
||||||
while(true) {
|
while(true) {
|
||||||
await new Promise(reso => setTimeout(reso, delay))
|
await new Promise(resolve => setTimeout(resolve, delay))
|
||||||
if(!this.unavailable) {
|
if(!this.unavailable) {
|
||||||
resolve()
|
return;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue