From e0378cf3505f3bc878ba824882d63ea6fa2261d7 Mon Sep 17 00:00:00 2001 From: Kyra Date: Wed, 18 Jul 2018 11:37:57 +0200 Subject: [PATCH] refactor(Webhook): make token not enumerable (#2566) * Hide Webhook#token (consistency with Client#token) * Make `Webhook#token` writable * fix: devsnek's requested change Webhook#token must be both writable and configurable. --- src/structures/Webhook.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js index cdb396c07..088806ca2 100644 --- a/src/structures/Webhook.js +++ b/src/structures/Webhook.js @@ -28,7 +28,7 @@ class Webhook { * The token for the webhook * @type {string} */ - this.token = data.token; + Object.defineProperty(this, 'token', { value: data.token, writable: true, configurable: true }); /** * The avatar for the webhook