mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 18:43:31 +01:00
do more docs
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -207,10 +207,6 @@ class GuildChannel extends Channel {
|
|||||||
return this.rest.client.rest.methods.updateChannel(this, { topic });
|
return this.rest.client.rest.methods.updateChannel(this, { topic });
|
||||||
}
|
}
|
||||||
|
|
||||||
setBitrate(bitrate) {
|
|
||||||
return this.rest.client.rest.methods.updateChannel(this, { bitrate });
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.
|
* When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.
|
||||||
* @returns {String}
|
* @returns {String}
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
const TextBasedChannel = require('./interface/TextBasedChannel');
|
const TextBasedChannel = require('./interface/TextBasedChannel');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents a Member of a Guild on Discord
|
||||||
|
* @implements {TextBasedChannel}
|
||||||
|
*/
|
||||||
class GuildMember {
|
class GuildMember {
|
||||||
constructor(guild, data) {
|
constructor(guild, data) {
|
||||||
this.client = guild.client;
|
this.client = guild.client;
|
||||||
@@ -64,6 +68,14 @@ class GuildMember {
|
|||||||
kick() {
|
kick() {
|
||||||
return this.client.rest.methods.kickGuildMember(this.guild, this);
|
return this.client.rest.methods.kickGuildMember(this.guild, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sendMessage() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
sendTTSMessage() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TextBasedChannel.applyToClass(GuildMember);
|
TextBasedChannel.applyToClass(GuildMember);
|
||||||
|
|||||||
@@ -13,9 +13,31 @@ class VoiceChannel extends GuildChannel {
|
|||||||
|
|
||||||
setup(data) {
|
setup(data) {
|
||||||
super.setup(data);
|
super.setup(data);
|
||||||
|
/**
|
||||||
|
* The bitrate of this voice channel
|
||||||
|
* @type {Number}
|
||||||
|
*/
|
||||||
this.bitrate = data.bitrate;
|
this.bitrate = data.bitrate;
|
||||||
|
/**
|
||||||
|
* The maximum amount of users allowed in this channel - 0 means unlimited.
|
||||||
|
* @type {Number}
|
||||||
|
*/
|
||||||
this.userLimit = data.user_limit;
|
this.userLimit = data.user_limit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the bitrate of the channel
|
||||||
|
* @param {Number} bitrate the new bitrate
|
||||||
|
* @returns {Promise<VoiceChannel>}
|
||||||
|
* @example
|
||||||
|
* // set the bitrate of a voice channel
|
||||||
|
* voiceChannel.setBitrate(48000)
|
||||||
|
* .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))
|
||||||
|
* .catch(console.log);
|
||||||
|
*/
|
||||||
|
setBitrate(bitrate) {
|
||||||
|
return this.rest.client.rest.methods.updateChannel(this, { bitrate });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = VoiceChannel;
|
module.exports = VoiceChannel;
|
||||||
|
|||||||
Reference in New Issue
Block a user