mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-26 04:31:03 +00:00
feat: run bots in one process
This commit is contained in:
10
bots/index.js
Normal file
10
bots/index.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import { readdirSync } from 'node:fs';
|
||||
|
||||
const botFolders = readdirSync('./', { withFileTypes: true })
|
||||
.filter(dirent => dirent.isDirectory())
|
||||
.map(dirent => dirent.name);
|
||||
|
||||
for (const botFolder of botFolders) {
|
||||
const botIndex = await import(`./${botFolder}/index.js`);
|
||||
botIndex.default();
|
||||
}
|
||||
Reference in New Issue
Block a user