11 lines
258 B
TypeScript
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"
|
|
}
|
|
});
|
|
}
|