Files
illegitimate-bot/scripts/update-bot.ts
2024-10-13 20:17:59 +02:00

19 lines
408 B
TypeScript

import axios from "axios"
const url = process.env.WATCHTOWERURL
const token = process.env.WATCHTOWERTOKEN
if (!url || !token) {
throw new Error("Missing WATCHTOWERURL or WATCHTOWERTOKEN")
}
await axios.get(url, {
headers: {
Authorization: `Bearer ${token}`
}
}).then(() => {
console.log("Illegitimate bot updated")
}).catch(err => {
console.error("Error updating bot", err)
})