reciple 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/bin.js +2 -1
- package/bin/reciple/modules.js +1 -1
- package/package.json +1 -1
package/bin/bin.js
CHANGED
|
@@ -14,7 +14,8 @@ const Config_1 = require("./reciple/classes/Config");
|
|
|
14
14
|
const Client_1 = require("./reciple/classes/Client");
|
|
15
15
|
const fs_1 = require("fs");
|
|
16
16
|
const fallout_utility_1 = require("fallout-utility");
|
|
17
|
-
|
|
17
|
+
const allowedFiles = ['node_modules', 'reciple.yml', 'package.json', 'package.lock.json'];
|
|
18
|
+
if ((0, fs_1.readdirSync)('./').filter(f => !f.startsWith('.') && allowedFiles.indexOf(f)).length > 0 && !(0, fs_1.existsSync)('./reciple.yml')) {
|
|
18
19
|
const ask = (0, fallout_utility_1.input)('This directory does not contain reciple.yml. Would you like to init axis here? [y/n] ');
|
|
19
20
|
if (ask !== 'y')
|
|
20
21
|
process.exit(0);
|
package/bin/reciple/modules.js
CHANGED
|
@@ -32,7 +32,7 @@ function loadModules(client) {
|
|
|
32
32
|
module_ = require(modulePath);
|
|
33
33
|
if (!module_.versions || !(typeof module_.versions === 'object' ? module_.versions : [module_.versions]).includes(client.version))
|
|
34
34
|
throw new Error('Module versions is not defined or unsupported.');
|
|
35
|
-
if (!module_.onStart(client))
|
|
35
|
+
if (!(yield Promise.resolve(module_.onStart(client))))
|
|
36
36
|
throw new Error(script + ' onStart is not defined or returned false.');
|
|
37
37
|
if (module_.commands) {
|
|
38
38
|
for (const command of module_.commands) {
|