Files
Microsoft-Rewards-Farmer/src/util/Webhook.ts
2025-04-30 15:05:58 +02:00

23 lines
500 B
TypeScript

import axios from 'axios'
import { Config } from '../interface/Config'
export async function Webhook(configData: Config, content: string) {
const webhook = configData.webhook
if (!webhook.enabled || webhook.url.length < 10) return
const request = {
method: 'POST',
url: webhook.url,
headers: {
'Content-Type': 'application/json'
},
data: {
'content': content
}
}
await axios(request).catch(() => { })
}