This commit is contained in:
ITOH
2021-05-02 21:36:36 +02:00
parent 81e70dc4ff
commit 5240981d61
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -49,8 +49,8 @@ const baseChannel: Partial<DiscordenoChannel> = {
disconnect(memberId) { disconnect(memberId) {
return disconnectMember(this.guildId!, memberId); return disconnectMember(this.guildId!, memberId);
}, },
delete() { delete(reason) {
return deleteChannel(this.guildId!, this.id!); return deleteChannel(this.id!, reason);
}, },
editOverwrite(id, options) { editOverwrite(id, options) {
return editChannelOverwrite(this.guildId!, this.id!, 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 a member from a voice channel. Requires MOVE_MEMBERS permission. */
disconnect(memberID: string): ReturnType<typeof disconnectMember>; disconnect(memberID: string): ReturnType<typeof disconnectMember>;
/** Delete the channel */ /** Delete the channel */
delete(): ReturnType<typeof deleteChannel>; delete(reason?: string): ReturnType<typeof deleteChannel>;
/** Edit a channel Overwrite */ /** Edit a channel Overwrite */
editOverwrite( editOverwrite(
overwriteID: string, overwriteID: string,
+1 -1
View File
@@ -21,7 +21,7 @@ Deno.test({
} }
// Delete the channel now without a reason // 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 // wait 5 seconds to give it time for CHANNEL_DELETE event
await delayUntil(3000, () => !cache.channels.has(channel.id)); await delayUntil(3000, () => !cache.channels.has(channel.id));
// Make sure it is gone from cache // Make sure it is gone from cache