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;