From 003ff4073d9489484b3c5ae5cbbb05cdf718ce49 Mon Sep 17 00:00:00 2001 From: Johnson Chen Date: Sat, 25 Apr 2020 18:13:53 +1000 Subject: [PATCH] feat: throw vanity url error instead of returning rejected promise Co-Authored-By: Vlad Frangu --- src/structures/Guild.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 7e7b21c2e..728365d2b 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -774,7 +774,7 @@ class Guild extends Base { */ async fetchVanityData() { if (!this.features.includes('VANITY_URL')) { - return Promise.reject(new Error('VANITY_URL')); + throw new Error('VANITY_URL'); } const data = await this.client.api.guilds(this.id, 'vanity-url').get(); this.vanityURLUses = data.uses;