From 60164122bf169b864f00e89f086c2ad0bddbd9bc Mon Sep 17 00:00:00 2001 From: ZiomaleQ Date: Tue, 5 Jan 2021 14:51:04 +0100 Subject: [PATCH] Adding promise ending ')' --- src/structures/guild.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/structures/guild.ts b/src/structures/guild.ts index 04ebcfe..c1af7ca 100644 --- a/src/structures/guild.ts +++ b/src/structures/guild.ts @@ -313,14 +313,14 @@ export class Guild extends Base { async awaitAvailability(delay: number = 1000): Promise { return await new Promise((resolve, reject) => { if(!this.unavailable) return; - var listener = (guild: Guild): void => { + let listener = (guild: Guild): void => { if (guild.id === this.id) { - this.removeListener('guildLoaded', listener); + this.client.removeListener('guildLoaded', listener); resolve(); } }; this.client.on('guildLoaded', listener); - } + }); } }