From a965b3709ad8bdbd05177e9d6d35c95bb84e2c43 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Sun, 16 Jul 2017 07:04:40 -0500 Subject: [PATCH] move nsfw to the new prop (#1687) --- src/structures/TextChannel.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index 65dfdef54..cf65bc9e1 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -25,6 +25,13 @@ class TextChannel extends GuildChannel { */ this.topic = data.topic; + /** + * If the Discord considers this channel NSFW + * @type {boolean} + * @readonly + */ + this.nsfw = data.nsfw; + this.lastMessageID = data.last_message_id; } @@ -43,15 +50,6 @@ class TextChannel extends GuildChannel { return members; } - /** - * If the Discord considers this channel NSFW - * @type {boolean} - * @readonly - */ - get nsfw() { - return /^nsfw(-|$)/.test(this.name); - } - /** * Fetch all webhooks for the channel. * @returns {Promise>}