diff --git a/functions/api/game-appeals/submit.ts b/functions/api/game-appeals/submit.ts index 1625a02..bb34875 100644 --- a/functions/api/game-appeals/submit.ts +++ b/functions/api/game-appeals/submit.ts @@ -59,6 +59,22 @@ export async function onRequestPost(context: RequestContext) { "INSERT INTO game_appeals (created_at, id, open, user) VALUES (?, ?, ?, ?);", ).bind(Date.now(), appealId, 1, id); + await fetch(context.env.REPORTS_WEBHOOK, { + body: JSON.stringify({ + embeds: [ + { + color: 3756250, + description: `${username} has pleaded for forgiveness! Head to https://carcrushers.cc/mod-queue?id=${appealId}&type=gma`, + title: "Appeal Submitted", + }, + ], + }), + headers: { + "content-type": "application/json", + }, + method: "POST", + }); + return new Response(null, { status: 204, });