Add TextChannel#setNSFW method (#2050)

* Add TextChannel#setNSFW method

* Doesn't look like anything to me

* butts
This commit is contained in:
Schuyler Cebulskie
2017-10-27 10:34:18 -04:00
committed by GitHub
parent cd54e9317f
commit 0fc9459450
2 changed files with 12 additions and 0 deletions

View File

@@ -38,6 +38,16 @@ class TextChannel extends GuildChannel {
if (data.messages) for (const message of data.messages) this.messages.create(message);
}
/**
* Sets whether this channel is flagged as NSFW.
* @param {boolean} nsfw Whether the channel should be considered NSFW
* @param {string} [reason] Reason for changing the channel's NSFW flag
* @returns {Promise<TextChannel>}
*/
setNSFW(nsfw, reason) {
return this.edit({ nsfw }, reason);
}
/**
* Fetches all webhooks for the channel.
* @returns {Promise<Collection<Snowflake, Webhook>>}