Skip to content

Commit

Permalink
refactor(VoiceState): Change kick to disconnect (#6251)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiralite committed Jul 31, 2021
1 parent bb5e648 commit 24931d7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/structures/GuildMember.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ class GuildMember extends Base {
* @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} [deaf] Whether or not the member should be deafened
* @property {GuildVoiceChannelResolvable|null} [channel] Channel to move member to (if they are connected to voice),
* or `null` if you want to disconnect them from voice
* @property {GuildVoiceChannelResolvable|null} [channel] Channel to move the member to
* (if they are connected to voice), or `null` if you want to disconnect them from voice
*/

/**
Expand Down
6 changes: 3 additions & 3 deletions src/structures/VoiceState.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@ class VoiceState extends Base {
}

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

Expand Down
2 changes: 1 addition & 1 deletion typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1876,7 +1876,7 @@ export class VoiceState extends Base {

public setDeaf(deaf: 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 setRequestToSpeak(request: boolean): Promise<void>;
public setSuppressed(suppressed: boolean): Promise<void>;
Expand Down

0 comments on commit 24931d7

Please sign in to comment.