28 lines
609 B
JavaScript
28 lines
609 B
JavaScript
console.log("started");
|
|
|
|
function sendAd() {
|
|
fetch("https://api.rolimons.com/tradeads/v1/createad", {
|
|
method: "POST",
|
|
credentials: "include",
|
|
headers: {
|
|
"User-Agent": "xunuwu's personal bot (xunuwu@gmail.com)",
|
|
"Content-Type": "application/json",
|
|
Cookie: process.env.COOKIE,
|
|
},
|
|
body: process.env.OFFER,
|
|
}).then((res) => {
|
|
if (res.ok) {
|
|
console.log("success");
|
|
} else {
|
|
console.log("failure");
|
|
}
|
|
res.json().then((x) => {
|
|
console.log("return body: ");
|
|
console.log(x);
|
|
});
|
|
});
|
|
}
|
|
|
|
sendAd();
|
|
|
|
setInterval(sendAd, 60_000 * 5);
|