Update clone_channel.ts

This commit is contained in:
ITOH
2021-05-12 11:56:07 +02:00
parent 5498f07946
commit bf234c7744
-1
View File
@@ -9,7 +9,6 @@ import { createChannel } from "./create_channel.ts";
/** Create a copy of a channel */ /** Create a copy of a channel */
export async function cloneChannel(channelId: bigint, reason?: string) { export async function cloneChannel(channelId: bigint, reason?: string) {
const channelToClone = await cacheHandlers.get("channels", channelId); const channelToClone = await cacheHandlers.get("channels", channelId);
//Return undefined if channel is not cached
if (!channelToClone) throw new Error(Errors.CHANNEL_NOT_FOUND); if (!channelToClone) throw new Error(Errors.CHANNEL_NOT_FOUND);
//Check for DM channel //Check for DM channel