feat(GuildChannel): add setNSFW method

Backported from commit: 0fc9459450
PR: #2050
This commit is contained in:
SpaceEEC
2018-05-09 16:04:49 +02:00
parent 9169958264
commit 54913d9edb
3 changed files with 32 additions and 20 deletions

View File

@@ -335,6 +335,7 @@ class RESTMethods {
const data = {};
data.name = (_data.name || channel.name).trim();
data.topic = typeof _data.topic === 'undefined' ? channel.topic : _data.topic;
data.nsfw = typeof _data.nsfw === 'undefined' ? channel.nsfw : _data.nsfw;
data.position = _data.position || channel.position;
data.bitrate = _data.bitrate || (channel.bitrate ? channel.bitrate * 1000 : undefined);
data.user_limit = typeof _data.userLimit !== 'undefined' ? _data.userLimit : channel.userLimit;