Me when new webhook
This commit is contained in:
parent
dad288ca56
commit
1e7fab9a38
@ -76,6 +76,22 @@ export async function onRequestPost(context: RequestContext) {
|
||||
)
|
||||
.run();
|
||||
|
||||
await fetch(context.env.EVENTS_WEBHOOK, {
|
||||
body: JSON.stringify({
|
||||
embeds: [
|
||||
{
|
||||
title: "Event Submitted",
|
||||
color: 3756250,
|
||||
description: `${context.data.user.username} submitted an event for ${currentYear}-${currentMonth}-${day}. See it at https://carcrushers.cc/events-team`,
|
||||
},
|
||||
],
|
||||
}),
|
||||
headers: {
|
||||
"content-type": "application/json",
|
||||
},
|
||||
method: "POST",
|
||||
});
|
||||
|
||||
return new Response(null, {
|
||||
status: 204,
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user