From f03c6209a42ae3e922bdb86954de04f1ae6daaa8 Mon Sep 17 00:00:00 2001 From: MathMan05 Date: Fri, 2 May 2025 11:35:07 -0500 Subject: [PATCH] send the real index --- src/api/routes/guilds/#guild_id/channels.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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",