mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
feat(VoiceState): add kick method (#3462)
* feat(VoiceState): add kick method * feat(typings): add types for VoiceState#kick method
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user