From cc9df708cece37fdd181264ca77b9eef05d3ce5c Mon Sep 17 00:00:00 2001 From: Rory& Date: Mon, 25 May 2026 22:52:51 +0200 Subject: [PATCH] channelOrdering: fix null ref --- src/util/entities/Guild.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/entities/Guild.ts b/src/util/entities/Guild.ts index aa6816c2d..aea911eb5 100644 --- a/src/util/entities/Guild.ts +++ b/src/util/entities/Guild.ts @@ -462,6 +462,8 @@ export class Guild extends BaseClass { select: { channel_ordering: true }, }); + guild.channel_ordering ??= []; + let position; if (typeof insertPoint == "string") position = guild.channel_ordering.indexOf(insertPoint) + 1; else position = insertPoint;