mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 17:43:30 +01:00
Document GuildChannel.edit, add VoiceChannel.setUserLimit, fix typo (#866)
This commit is contained in:
committed by
Schuyler Cebulskie
parent
2a50dad852
commit
9a61de1493
@@ -159,11 +159,13 @@ class RESTMethods {
|
||||
});
|
||||
}
|
||||
|
||||
updateChannel(channel, data) {
|
||||
data.name = (data.name || channel.name).trim();
|
||||
data.topic = data.topic || channel.topic;
|
||||
data.position = data.position || channel.position;
|
||||
data.bitrate = data.bitrate || channel.bitrate;
|
||||
updateChannel(channel, _data) {
|
||||
const data = {};
|
||||
data.name = (_data.name || channel.name).trim();
|
||||
data.topic = _data.topic || channel.topic;
|
||||
data.position = _data.position || channel.position;
|
||||
data.bitrate = _data.bitrate || channel.bitrate;
|
||||
data.user_limit = _data.userLimit || channel.userLimit;
|
||||
return this.rest.makeRequest('patch', Constants.Endpoints.channel(channel.id), true, data).then(newData =>
|
||||
this.rest.client.actions.ChannelUpdate.handle(newData).updated
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user