mirror of
https://github.com/danbulant/discord.js
synced 2026-05-29 20:30:38 +00:00
fix(GuildMemberStore): reject BAN_RESOLVE_ID error instead of throwing it (#3425)
This commit is contained in:
parent
d14db52158
commit
9e76f23314
1 changed files with 1 additions and 1 deletions
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue