i hate js

master
Andriy Cherniy 2022-06-01 09:52:12 +03:00
parent 05fb27654f
commit 3109577327
1 changed files with 5 additions and 2 deletions

7
react.js vendored
View File

@ -15,9 +15,12 @@ const logger = pino({
(async () => {
const tokensFile = await fs.readFile("TOKENS.txt", "utf-8");
logger.warn("You should remove this after debug");
logger.info(tokensFile);
// logger.info(tokensFile);
const tokens = tokensFile.split("\n").filter(token => token.trim() !== "");
const clients = tokens.map((token) => new Discord.Client(token));
const clients = tokens.map((token) => {
logger.info(`Init ${token} client`)
return new Discord.Client(token)
});
// let users = JSON.parse(await fs.readFile("./users.json", "utf-8"));
clients.forEach((client) => {
client.on.ready = async () => {