octoplus-coffee-check/webhook.ts
2025-05-22 17:56:23 +01:00

11 lines
258 B
TypeScript

export default async function sendMessage(webhookUrl: string, text: string): Promise<void> {
await fetch(webhookUrl, {
method: "POST",
body: JSON.stringify({
text,
}),
headers: {
"Content-Type": "application/json"
}
});
}