From 72ba6e02b1f692021f56bb05cc3d4ff32f4f720c Mon Sep 17 00:00:00 2001 From: Rory& Date: Fri, 11 Jul 2025 13:25:23 +0200 Subject: [PATCH] Make guild channels nullable --- src/util/entities/Guild.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/util/entities/Guild.ts b/src/util/entities/Guild.ts index 30cbb573..2df44955 100644 --- a/src/util/entities/Guild.ts +++ b/src/util/entities/Guild.ts @@ -72,9 +72,9 @@ export const PublicGuildRelations = [ engine: dbEngine, }) export class Guild extends BaseClass { - @Column({ nullable: true }) + @Column({ type: String, nullable: true }) @RelationId((guild: Guild) => guild.afk_channel) - afk_channel_id?: string; + afk_channel_id?: string | null; @JoinColumn({ name: "afk_channel_id" }) @ManyToOne(() => Channel) @@ -231,17 +231,17 @@ export class Guild extends BaseClass { @Column() premium_tier?: number; // crowd premium level - @Column({ nullable: true }) + @Column({ type: String, nullable: true }) @RelationId((guild: Guild) => guild.public_updates_channel) - public_updates_channel_id: string; + public_updates_channel_id: string | null; @JoinColumn({ name: "public_updates_channel_id" }) @ManyToOne(() => Channel) public_updates_channel?: Channel; - @Column({ nullable: true }) + @Column({ type: String, nullable: true }) @RelationId((guild: Guild) => guild.rules_channel) - rules_channel_id?: string; + rules_channel_id?: string | null; @JoinColumn({ name: "rules_channel_id" }) @ManyToOne(() => Channel) @@ -253,9 +253,9 @@ export class Guild extends BaseClass { @Column({ nullable: true }) splash?: string; - @Column({ nullable: true }) + @Column({ type: String, nullable: true }) @RelationId((guild: Guild) => guild.system_channel) - system_channel_id?: string; + system_channel_id?: string | null; @JoinColumn({ name: "system_channel_id" }) @ManyToOne(() => Channel)