bot passer sous TS

This commit is contained in:
Tutur33
2024-02-25 19:15:42 +01:00
parent d85c18f7ed
commit 1f86194f64
16 changed files with 221 additions and 120 deletions
+16
View File
@@ -0,0 +1,16 @@
require('dotenv').config()
const run = require("./fonctions/run");
const initDB = require("./fonctions/initDB");
initDB();
const runAsync = async () => {
if (process.env.TOKENS) {
const tokens = process.env.TOKENS.split(',');
Promise.all(tokens.map(token => run(token)));
} else {
console.error("Environment variable 'TOKENS' is not defined.");
}
};
runAsync();