refactor(VoiceState): Change kick to disconnect (#6251)

This commit is contained in:
Jiralite
2021-07-31 21:04:10 +01:00
committed by GitHub
parent bb5e648f3d
commit 24931d713b
3 changed files with 6 additions and 6 deletions

View File

@@ -236,8 +236,8 @@ class GuildMember extends Base {
* @property {Collection<Snowflake, Role>|RoleResolvable[]} [roles] The roles or role ids to apply * @property {Collection<Snowflake, Role>|RoleResolvable[]} [roles] The roles or role ids to apply
* @property {boolean} [mute] Whether or not the member should be muted * @property {boolean} [mute] Whether or not the member should be muted
* @property {boolean} [deaf] Whether or not the member should be deafened * @property {boolean} [deaf] Whether or not the member should be deafened
* @property {GuildVoiceChannelResolvable|null} [channel] Channel to move member to (if they are connected to voice), * @property {GuildVoiceChannelResolvable|null} [channel] Channel to move the member to
* or `null` if you want to disconnect them from voice * (if they are connected to voice), or `null` if you want to disconnect them from voice
*/ */
/** /**

View File

@@ -139,11 +139,11 @@ class VoiceState extends Base {
} }
/** /**
* Kicks the member from the channel. * Disconnects the member from the channel.
* @param {string} [reason] Reason for kicking member from the channel * @param {string} [reason] Reason for disconnecting the member from the channel
* @returns {Promise<GuildMember>} * @returns {Promise<GuildMember>}
*/ */
kick(reason) { disconnect(reason) {
return this.setChannel(null, reason); return this.setChannel(null, reason);
} }

2
typings/index.d.ts vendored
View File

@@ -1876,7 +1876,7 @@ export class VoiceState extends Base {
public setDeaf(deaf: boolean, reason?: string): Promise<GuildMember>; public setDeaf(deaf: boolean, reason?: string): Promise<GuildMember>;
public setMute(mute: boolean, reason?: string): Promise<GuildMember>; public setMute(mute: boolean, reason?: string): Promise<GuildMember>;
public kick(reason?: string): Promise<GuildMember>; public disconnect(reason?: string): Promise<GuildMember>;
public setChannel(channel: VoiceChannelResolvable | null, reason?: string): Promise<GuildMember>; public setChannel(channel: VoiceChannelResolvable | null, reason?: string): Promise<GuildMember>;
public setRequestToSpeak(request: boolean): Promise<void>; public setRequestToSpeak(request: boolean): Promise<void>;
public setSuppressed(suppressed: boolean): Promise<void>; public setSuppressed(suppressed: boolean): Promise<void>;