diff --git a/src/helpers/channels/swap_channels.ts b/src/helpers/channels/swap_channels.ts index 9c6801c36..c55b903d3 100644 --- a/src/helpers/channels/swap_channels.ts +++ b/src/helpers/channels/swap_channels.ts @@ -6,16 +6,14 @@ import { endpoints } from "../../util/constants.ts"; export async function swapChannels( guildId: string, channelPositions: ModifyGuildChannelPositions[], -): Promise { +) { if (channelPositions.length < 2) { throw "You must provide at least two channels to be swapped."; } - const result = await rest.runMethod( + return await rest.runMethod( "patch", endpoints.GUILD_CHANNELS(guildId), channelPositions, ); - - return result; }