From 4ce4dc019eeaa21d5b49d7ce800d3f84edee6555 Mon Sep 17 00:00:00 2001 From: Drahcirius Date: Tue, 27 Jun 2017 15:22:17 -0400 Subject: [PATCH] setTimeout should use args (#1623) --- src/client/Client.js | 4 ++-- src/client/WebhookClient.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/Client.js b/src/client/Client.js index 51e441cb4..97bbbdd96 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -420,9 +420,9 @@ class Client extends EventEmitter { */ setTimeout(fn, delay, ...args) { const timeout = setTimeout(() => { - fn(); + fn(...args); this._timeouts.delete(timeout); - }, delay, ...args); + }, delay); this._timeouts.add(timeout); return timeout; } diff --git a/src/client/WebhookClient.js b/src/client/WebhookClient.js index f89c8f973..99291b550 100644 --- a/src/client/WebhookClient.js +++ b/src/client/WebhookClient.js @@ -65,9 +65,9 @@ class WebhookClient extends Webhook { */ setTimeout(fn, delay, ...args) { const timeout = setTimeout(() => { - fn(); + fn(...args); this._timeouts.delete(timeout); - }, delay, ...args); + }, delay); this._timeouts.add(timeout); return timeout; }