Skip to content

Commit

Permalink
fix: tag schema to include embeds key
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rubyowo committed Oct 25, 2024
1 parent eb5fda8 commit 01db45f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/src/plugins/Tags/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof zTag>;

export const zTagCategory = z
Expand Down

0 comments on commit 01db45f

Please sign in to comment.