From 5240981d61d36487de4c1d09d033e93f653a4a88 Mon Sep 17 00:00:00 2001 From: ITOH <72305210+itohatweb@users.noreply.github.com> Date: Sun, 2 May 2021 21:36:36 +0200 Subject: [PATCH] this too --- src/structures/channel.ts | 6 +++--- tests/channels/delete_channel.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/structures/channel.ts b/src/structures/channel.ts index b20da7122..56f50dc05 100644 --- a/src/structures/channel.ts +++ b/src/structures/channel.ts @@ -49,8 +49,8 @@ const baseChannel: Partial = { disconnect(memberId) { return disconnectMember(this.guildId!, memberId); }, - delete() { - return deleteChannel(this.guildId!, this.id!); + delete(reason) { + return deleteChannel(this.id!, reason); }, editOverwrite(id, options) { return editChannelOverwrite(this.guildId!, this.id!, id, options); @@ -147,7 +147,7 @@ export interface DiscordenoChannel /** Disconnect a member from a voice channel. Requires MOVE_MEMBERS permission. */ disconnect(memberID: string): ReturnType; /** Delete the channel */ - delete(): ReturnType; + delete(reason?: string): ReturnType; /** Edit a channel Overwrite */ editOverwrite( overwriteID: string, diff --git a/tests/channels/delete_channel.ts b/tests/channels/delete_channel.ts index 41a8a4be3..57cb9c986 100644 --- a/tests/channels/delete_channel.ts +++ b/tests/channels/delete_channel.ts @@ -21,7 +21,7 @@ Deno.test({ } // Delete the channel now without a reason - await deleteChannel(tempData.guildId, channel.id); + await deleteChannel(channel.id); // wait 5 seconds to give it time for CHANNEL_DELETE event await delayUntil(3000, () => !cache.channels.has(channel.id)); // Make sure it is gone from cache