Create index.js
Browse files
index.js
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const path = require('path');
|
2 |
+
const CurrentPath = path.dirname(__filename)
|
3 |
+
const hasNapcatParam = process.argv.includes('--no-sandbox');
|
4 |
+
if (hasNapcatParam) {
|
5 |
+
(async () => {
|
6 |
+
await import("file://" + path.join(CurrentPath, './napcat/napcat.mjs'));
|
7 |
+
})();
|
8 |
+
} else {
|
9 |
+
require('./launcher.node').load('external_index', module);
|
10 |
+
}
|