mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-11 13:56:15 +00:00
feat: run only one bot when bot name given
This commit is contained in:
@@ -4,8 +4,10 @@ const botFolders = readdirSync('./', { withFileTypes: true })
|
||||
.filter(dirent => dirent.isDirectory())
|
||||
.map(dirent => dirent.name);
|
||||
|
||||
const runBotOnly = process.argv[2] ? process.argv[2] : null;
|
||||
for (const botFolder of botFolders) {
|
||||
if (botFolder === 'node_modules') continue;
|
||||
if (runBotOnly && runBotOnly !== botFolder) continue;
|
||||
const botIndex = await import(`./${botFolder}/index.js`);
|
||||
botIndex.default();
|
||||
}
|
||||
Reference in New Issue
Block a user