From 7ffd53eba40ff7261a36372935c3017576518a56 Mon Sep 17 00:00:00 2001 From: Johnson Chen Date: Tue, 12 May 2020 02:22:52 +1000 Subject: [PATCH] fix: throw Error instead of rejecting Promise --- 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 d58625de3..eb1e5213c 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -749,7 +749,7 @@ class Guild extends Base { */ fetchVanityCode() { if (!this.features.includes('VANITY_URL')) { - return Promise.reject(new Error('VANITY_URL')); + throw new Error('VANITY_URL'); } return this.client.api .guilds(this.id, 'vanity-url')