From 9e76f233143f2f0fe0ff9a9e645f32dc8db44b26 Mon Sep 17 00:00:00 2001 From: Vlad Frangu Date: Sat, 10 Aug 2019 13:22:11 +0300 Subject: [PATCH] fix(GuildMemberStore): reject BAN_RESOLVE_ID error instead of throwing it (#3425) --- src/stores/GuildMemberStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stores/GuildMemberStore.js b/src/stores/GuildMemberStore.js index 9f9c42117e7e..24946841aec9 100644 --- a/src/stores/GuildMemberStore.js +++ b/src/stores/GuildMemberStore.js @@ -177,7 +177,7 @@ class GuildMemberStore extends DataStore { */ unban(user, reason) { const id = this.client.users.resolveID(user); - if (!id) throw new Error('BAN_RESOLVE_ID'); + if (!id) return Promise.reject(new Error('BAN_RESOLVE_ID')); return this.client.api.guilds(this.guild.id).bans[id].delete({ reason }) .then(() => this.client.users.resolve(user)); }