mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-04 18:00:08 +00:00
Update src/helpers/channels/clone_channel.ts
Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user