feat(VoiceState): add kick method (#3462)

* feat(VoiceState): add kick method

* feat(typings): add types for VoiceState#kick method
This commit is contained in:
Will Nelson
2019-09-10 02:00:04 -07:00
committed by Amish Shah
parent a6810e2eaa
commit c86a6154aa
2 changed files with 10 additions and 0 deletions

View File

@@ -139,6 +139,15 @@ class VoiceState extends Base {
return this.member ? this.member.edit({ deaf }, reason) : Promise.reject(new Error('VOICE_STATE_UNCACHED_MEMBER'));
}
/**
* Kicks the member from the voice channel.
* @param {string} [reason] Reason for kicking member from the channel
* @returns {Promise<GuildMember>}
*/
kick(reason) {
return this.setChannel(null, reason);
}
/**
* Moves the member to a different channel, or kick them from the one they're in.
* @param {ChannelResolvable|null} [channel] Channel to move the member to, or `null` if you want to kick them from