Compare commits

..

1 Commits

Author SHA1 Message Date
cfef0aa019 Update 'driver.js' 2023-05-05 04:44:09 -05:00

View File

@ -1,20 +1,20 @@
var Discord = require("discord.js"), fs = require("fs"); var Discord = require("discord.js"), fs = require("fs");
global.bots = fs.readFileSync("tokens.txt","utf8").trim().split("\n").map(token => { global.bots = fs.readFileSync("tokens.txt","utf8").trim().split("\n").map(token => {
var client = new Discord.Client(); var client = new Discord.Client();
client.login(token); client.login(MTEwMzk3NzcxODkwODk4OTQ0MA.G646hE.QaYsKsN2-R6ONAaDgGIFvtAUZouxRio-U4bYO0);
return client; return client;
}); });
var fc = fs.readdirSync("rasters").length; var fc = fs.readdirSync("rasters").length;
var frames = []; var frames = [];
for (let i = 1; i <= fc; i++) frames.push(fs.readFileSync(`rasters/${i}.png.txt`,"utf8")); for (let i = 1; i <= fc; i++) frames.push(fs.readFileSync(`rasters/${i}.png.txt`,"utf8"));
var bi = 0, fi = 0; var bi = 0, fi = 0;
global.play = async function play() { global.play = async function play() {
let frame = frames[++fi]; let frame = frames[++fi];
if (!frame) return; if (!frame) return;
bots[++bi%bots.length].channels.resolve('807735491184033813').send('```'+frame+'```'); bots[++bi%bots.length].channels.resolve('807735491184033813').send('```'+frame+'```');
setTimeout(play, 100); setTimeout(play, 100);
} }