move nsfw to the new prop (#1687)

This commit is contained in:
Gus Caplan
2017-07-16 07:04:40 -05:00
committed by Crawl
parent b9434ed112
commit ed84d76a42

View File

@@ -24,6 +24,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;
}
@@ -42,15 +49,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<Collection<Snowflake, Webhook>>}