Update src/helpers/channels/clone_channel.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>
This commit is contained in:
Skillz4Killz
2021-04-14 08:47:46 -04:00
committed by GitHub
parent 4183ffd21d
commit ef88a57a38

View File

@@ -10,7 +10,7 @@ export async function cloneChannel(channelId: string, reason?: string) {
channelId
);
//Return undefined if channel is not cached (unsure about error handling)
if (!channelToClone) return;
if (!channelToClone) throw new Error(Errors.CHANNEL_NOT_FOUND);
//If "name" is undefined as specified by types
channelToClone.name ??= "new-channel";