From 366fe84bd0acdb190aa95e1d45c7d8bc7a64fce1 Mon Sep 17 00:00:00 2001 From: Evorp <3vorpgaming@gmail.com> Date: Sun, 22 Oct 2023 19:32:31 -0700 Subject: [PATCH] fixes (at least I got the discord bit right) --- src/v2/service/addon.service.ts | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/src/v2/service/addon.service.ts b/src/v2/service/addon.service.ts index 25e32c7..7eb0a74 100644 --- a/src/v2/service/addon.service.ts +++ b/src/v2/service/addon.service.ts @@ -1,6 +1,6 @@ import { URL } from "url"; import { UserProfile } from "../interfaces/users"; -import { APIEmbed } from "discord-api-types/v10"; +import { RESTPostAPIChannelMessageJSONBody } from "discord-api-types/v10"; import { Addons, Addon, @@ -610,18 +610,23 @@ export default class AddonService { title = `Add-on '${a.name}' ${now} by ${usernameApproval}`; name += "review"; } - const payload: APIEmbed = { - color: 7784773, - author: { - icon_url: "https://faithfulpack.net/image/pwa/favicon-32x32.png", - name, - }, - url, - title, - description, - footer: { - text: "Made in Mount Doom", - }, + const payload: RESTPostAPIChannelMessageJSONBody = { + embeds: [ + { + color: 7784773, + author: { + icon_url: "https://faithfulpack.net/image/pwa/favicon-32x32.png", + name, + }, + url, + title, + description, + footer: { + text: "Made in Mount Doom", + }, + }, + ], + content: "", }; await axios.post(process.env.WEBHOOK_URL, payload);