From 8d777db1d1965fa1de3d210b8aa5c539be5ad8c9 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Mon, 3 Oct 2016 20:27:41 -0400 Subject: [PATCH] Clean up status type error --- src/structures/ClientUser.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index 3900945a9..24b36bb42 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -125,7 +125,7 @@ class ClientUser extends User { */ setPresence(data) { // {"op":3,"d":{"status":"dnd","since":0,"game":null,"afk":false}} - return new Promise((resolve, reject) => { + return new Promise(resolve => { let status = this.localPresence.status || this.presence.status; let game = this.localPresence.game; let afk = this.localPresence.afk || this.presence.afk; @@ -139,10 +139,7 @@ class ClientUser extends User { } if (data.status) { - if (typeof data.status !== 'string') { - reject(new TypeError('status must be a string')); - return; - } + if (typeof data.status !== 'string') throw new TypeError('Status must be a string'); status = data.status; }