cuffeo constructor is now async

This commit is contained in:
Flummi 2019-08-20 18:02:13 +00:00
parent fe936b8cd6
commit 1f194e8267

View File

@ -18,7 +18,7 @@ const timeout = 1000;
this.clients = args.clients || [ "irc", "tg" ]; this.clients = args.clients || [ "irc", "tg" ];
this.f = args.f; this.f = args.f;
}, },
bot: new cuffeo(config.clients) bot: await new cuffeo(config.clients)
}; };
console.time("loading"); console.time("loading");
@ -28,7 +28,6 @@ const timeout = 1000;
}; };
console.timeLog("loading", "directories"); console.timeLog("loading", "directories");
const blah = (await Promise.all(Object.entries(modules).map(async ([dir, mods]) => ({ const blah = (await Promise.all(Object.entries(modules).map(async ([dir, mods]) => ({
[dir]: (await Promise.all(mods.map(async mod => { [dir]: (await Promise.all(mods.map(async mod => {
const res = await Promise.race([ const res = await Promise.race([