Skip to content

Commit

Permalink
fixes (at least I got the discord bit right)
Browse files Browse the repository at this point in the history
  • Loading branch information
3vorp committed Oct 23, 2023
1 parent 67995c3 commit 366fe84
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions src/v2/service/addon.service.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 366fe84

Please sign in to comment.