mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
Add TextChannel#setNSFW method (#2050)
* Add TextChannel#setNSFW method * Doesn't look like anything to me * butts
This commit is contained in:
committed by
GitHub
parent
cd54e9317f
commit
0fc9459450
@@ -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>>}
|
||||
|
||||
Reference in New Issue
Block a user