mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
Update src/helpers/channels/clone_channel.ts
Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>
This commit is contained in:
@@ -15,14 +15,10 @@ export async function cloneChannel(channelId: string, reason?: string) {
|
||||
//If "name" is undefined as specified by types
|
||||
channelToClone.name ??= "new-channel";
|
||||
|
||||
//Merge channel data with reason for createChannel options
|
||||
const creationData = {
|
||||
reason,
|
||||
...channelToClone,
|
||||
};
|
||||
//Create the channel (also handles permissions)
|
||||
return createChannel(
|
||||
channelToClone.guildId!,
|
||||
creationData as CreateGuildChannel
|
||||
channelToClone,
|
||||
reason,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user