From 01db45f892d4373052e4bc1c1b3b4c0e50d9f943 Mon Sep 17 00:00:00 2001 From: Ruby Date: Fri, 25 Oct 2024 15:46:31 +0200 Subject: [PATCH] fix: tag schema to include `embeds` key during the io-ts to zod migration, there appears to have been a mistake where the `embeds` key wasn't included in the schema, causing an error when parsing it to a message object --- backend/src/plugins/Tags/types.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/plugins/Tags/types.ts b/backend/src/plugins/Tags/types.ts index 3043c3b7d..9e7e2d587 100644 --- a/backend/src/plugins/Tags/types.ts +++ b/backend/src/plugins/Tags/types.ts @@ -6,7 +6,8 @@ import { GuildSavedMessages } from "../../data/GuildSavedMessages.js"; import { GuildTags } from "../../data/GuildTags.js"; import { zEmbedInput } from "../../utils.js"; -export const zTag = z.union([z.string(), zEmbedInput]); +const zEmbeds = z.object({embeds: z.array(zEmbedInput)}) +export const zTag = z.union([z.string(), zEmbeds]); export type TTag = z.infer; export const zTagCategory = z