diff --git a/src/api/routes/guilds/#guild_id/channels.ts b/src/api/routes/guilds/#guild_id/channels.ts index 0160641a..8f8ee3af 100644 --- a/src/api/routes/guilds/#guild_id/channels.ts +++ b/src/api/routes/guilds/#guild_id/channels.ts @@ -146,8 +146,8 @@ router.patch( where: { id: opt.id }, }); - channel.position = opt.position as number; notMentioned.splice(opt.position as number, 0, channel.id); + channel.position = notMentioned.findIndex((_) => _ === channel.id); await emitEvent({ event: "CHANNEL_UPDATE",