fishing-bot-mod/saveParticipantData.js

26 lines
855 B
JavaScript
Raw Normal View History

2022-06-04 19:27:14 +02:00
require("dotenv").config();
let Client = require("./src/mppt-client.js");
let client = new Client("wss://mppclone.com:8443", process.env.MPPCLONE_TOKEN);
let fs = require('fs');
client.start();
client.setChannel("✧𝓓𝓔𝓥 𝓡𝓸𝓸𝓶✧");
// let _id = "c9b24baebcf6a664432c90d2";
function rrggbbrand(){var a = Math.floor(Math.random() * 256).toString(16); return a.length < 2 ? "0"+a : a};
let j = {};
client.on("ch", () => {
// let color = `#${rrggbbrand()}${rrggbbrand()}${rrggbbrand()}`;
// console.log(color);
// client.sendArray([{m:'setcolor', _id:_id, color:color}]);
// client.sendArray([{m:'setcolor', _id:_id, color:"#000000"}]);
// client.sendArray([{m:'setname', _id:_id, name:"Anonymous"}]);
j = client.ppl;
fs.writeFileSync('ppl.json', JSON.stringify(j, undefined, 4));
process.exit();
});