mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 13:03:31 +01:00
refactor(VoiceState): Change kick to disconnect (#6251)
This commit is contained in:
@@ -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
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -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
2
typings/index.d.ts
vendored
@@ -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>;
|
||||||
|
|||||||
Reference in New Issue
Block a user