Updated script for bot updates

This commit is contained in:
2024-10-13 20:17:59 +02:00
parent 520928d4aa
commit e993b133a0
2 changed files with 1 additions and 0 deletions

18
scripts/update-bot.ts Normal file
View File

@@ -0,0 +1,18 @@
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)
})