mirror of
https://github.com/danbulant/discord.js
synced 2026-06-08 09:13:22 +00:00
move nsfw to the new prop (#1687)
This commit is contained in:
parent
111fa2da93
commit
a965b3709a
1 changed files with 7 additions and 9 deletions
|
|
@ -25,6 +25,13 @@ class TextChannel extends GuildChannel {
|
||||||
*/
|
*/
|
||||||
this.topic = data.topic;
|
this.topic = data.topic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the Discord considers this channel NSFW
|
||||||
|
* @type {boolean}
|
||||||
|
* @readonly
|
||||||
|
*/
|
||||||
|
this.nsfw = data.nsfw;
|
||||||
|
|
||||||
this.lastMessageID = data.last_message_id;
|
this.lastMessageID = data.last_message_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -43,15 +50,6 @@ class TextChannel extends GuildChannel {
|
||||||
return members;
|
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.
|
* Fetch all webhooks for the channel.
|
||||||
* @returns {Promise<Collection<Snowflake, Webhook>>}
|
* @returns {Promise<Collection<Snowflake, Webhook>>}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue