fix: use disconnectMember

This commit is contained in:
ayntee
2021-03-15 15:43:50 +04:00
parent e852dc315a
commit 3e0de857c6
+3 -3
View File
@@ -3,8 +3,8 @@ import { deleteChannel } from "../helpers/channels/delete_channel.ts";
import { deleteChannelOverwrite } from "../helpers/channels/delete_channel_overwrite.ts";
import { editChannel } from "../helpers/channels/edit_channel.ts";
import { editChannelOverwrite } from "../helpers/channels/edit_channel_overwrite.ts";
import { kickFromVoiceChannel } from "../helpers/members/disconnect_member.ts";
import { sendMessage } from "../helpers/messages/send_message.ts";
import { disconnectMember } from "../helpers/mod.ts";
import {
ChannelCreatePayload,
ChannelEditOptions,
@@ -48,7 +48,7 @@ const baseChannel: Partial<Channel> = {
return sendMessage(this.id!, content);
},
disconnect(memberID) {
return kickFromVoiceChannel(this.guildID!, memberID);
return disconnectMember(this.guildID!, memberID);
},
delete() {
return deleteChannel(this.guildID!, this.id!);
@@ -176,7 +176,7 @@ export interface Channel {
/** Send a message to the channel. Requires SEND_MESSAGES permission. */
send(content: string | MessageContent): ReturnType<typeof sendMessage>;
/** Disconnect a member from a voice channel. Requires MOVE_MEMBERS permission. */
disconnect(memberID: string): ReturnType<typeof kickFromVoiceChannel>;
disconnect(memberID: string): ReturnType<typeof disconnectMember>;
/** Delete the channel */
delete(): ReturnType<typeof deleteChannel>;
/** Edit a channel Overwrite */