From 83be88bb8010bc0beb18498e4d72818a1e46ec20 Mon Sep 17 00:00:00 2001 From: MathMan05 Date: Thu, 30 Oct 2025 16:47:59 -0500 Subject: fix SQLite --- src/util/entities/ApplicationCommand.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/util') diff --git a/src/util/entities/ApplicationCommand.ts b/src/util/entities/ApplicationCommand.ts index 82436f7a..0c7eaa0f 100644 --- a/src/util/entities/ApplicationCommand.ts +++ b/src/util/entities/ApplicationCommand.ts @@ -53,7 +53,7 @@ export class ApplicationCommand extends BaseClass { @Column({ nullable: true, type: "simple-json" }) description_localizations?: Record; - @Column({ type: "simple-json", default: [] }) + @Column({ type: "simple-json" }) options: ApplicationCommandOption[]; @Column({ nullable: true, type: String }) -- cgit 1.5.1 From 31c0f160e9357f94d9148db5828328b055edb9a1 Mon Sep 17 00:00:00 2001 From: MathMan05 Date: Thu, 30 Oct 2025 17:21:31 -0500 Subject: fix --- src/util/entities/ApplicationCommand.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/util') diff --git a/src/util/entities/ApplicationCommand.ts b/src/util/entities/ApplicationCommand.ts index 0c7eaa0f..8ec154f8 100644 --- a/src/util/entities/ApplicationCommand.ts +++ b/src/util/entities/ApplicationCommand.ts @@ -53,7 +53,7 @@ export class ApplicationCommand extends BaseClass { @Column({ nullable: true, type: "simple-json" }) description_localizations?: Record; - @Column({ type: "simple-json" }) + @Column({ type: "simple-json", default: "[]" }) options: ApplicationCommandOption[]; @Column({ nullable: true, type: String }) -- cgit 1.5.1 From 2adee55ef8a9daa35bf63926f06c81c46e87f02a Mon Sep 17 00:00:00 2001 From: CyberL1 Date: Sat, 8 Nov 2025 15:21:39 +0100 Subject: fix: gif stickers should have `format_type` 4 instead of 0 --- src/schemas/api/guilds/Sticker.ts | 2 +- .../postgres/1762611552514-fix-gif-stickers-format_type.ts | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 src/util/migration/postgres/1762611552514-fix-gif-stickers-format_type.ts (limited to 'src/util') diff --git a/src/schemas/api/guilds/Sticker.ts b/src/schemas/api/guilds/Sticker.ts index 89b11ccf..b02e1e21 100644 --- a/src/schemas/api/guilds/Sticker.ts +++ b/src/schemas/api/guilds/Sticker.ts @@ -4,8 +4,8 @@ export enum StickerType { } export enum StickerFormatType { - GIF = 0, // gif is a custom format type and not in discord spec PNG = 1, APNG = 2, LOTTIE = 3, + GIF = 4, } diff --git a/src/util/migration/postgres/1762611552514-fix-gif-stickers-format_type.ts b/src/util/migration/postgres/1762611552514-fix-gif-stickers-format_type.ts new file mode 100644 index 00000000..47de7506 --- /dev/null +++ b/src/util/migration/postgres/1762611552514-fix-gif-stickers-format_type.ts @@ -0,0 +1,11 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class FixGifStickersFormatType1762611552514 implements MigrationInterface { + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`UPDATE "stickers" SET "format_type" = 4 WHERE "format_type" = 0;`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`UPDATE "stickers" SET "format_type" = 0 WHERE "format_type" = 4;`); + } +} -- cgit 1.5.1