diff options
-rw-r--r-- | .nvmrc | 1 | ||||
-rw-r--r-- | ecosystem.config.cjs | 4 | ||||
-rw-r--r-- | package.json | 6 | ||||
-rw-r--r-- | src/lib/extensions/discord-akairo/BushClient.ts | 1 | ||||
-rw-r--r-- | start.sh | 4 |
5 files changed, 10 insertions, 6 deletions
@@ -1 +0,0 @@ -17
\ No newline at end of file diff --git a/ecosystem.config.cjs b/ecosystem.config.cjs index 3262f29..33b880d 100644 --- a/ecosystem.config.cjs +++ b/ecosystem.config.cjs @@ -3,7 +3,7 @@ module.exports = { { name: 'bush-bot', script: 'yarn', - args: 'nvm run --experimental-json-modules --no-warnings dist/src/bot.js', + args: './start.sh', out_file: '../bushbot.log', error_file: '../bushbot.log', max_memory_restart: '1G', @@ -17,7 +17,7 @@ module.exports = { { name: 'bush-bot-beta', script: 'yarn', - args: 'nvm run --experimental-json-modules --no-warnings dist/src/bot.js', + args: './start.sh', out_file: '../bushbot-beta.log', error_file: '../bushbot-beta.log', max_memory_restart: '1G', diff --git a/package.json b/package.json index ea63be2..0669579 100644 --- a/package.json +++ b/package.json @@ -28,9 +28,9 @@ "build:esbuild": "yarn rimraf dist && yarn esbuild --sourcemap=inline --outdir=dist --platform=node --target=es2020 --format=esm --log-level=warning src/**/*.ts", "build:tsc": "yarn rimraf dist && yarn tsc", "build:tsc:no-emit": "yarn rimraf dist && yarn tsc --noEmit", - "_start": "yarn build:esbuild && node --experimental-json-modules --no-warnings dist/src/bot.js", - "start": "yarn build:tsc && node --experimental-json-modules --no-warnings dist/src/bot.js", - "dev": "yarn build:tsc && node --experimental-json-modules --no-warnings dist/src/bot.js", + "_start": "yarn build:esbuild && ./start.sh", + "start": "yarn build:tsc && ./start.sh", + "dev": "yarn build:tsc && ./start.sh", "test": "yarn lint && yarn tsc --noEmit", "format": "yarn prettier . --write", "lint": "yarn eslint --ext js,jsx,ts,tsx src", diff --git a/src/lib/extensions/discord-akairo/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts index c87a1d9..8dd1748 100644 --- a/src/lib/extensions/discord-akairo/BushClient.ts +++ b/src/lib/extensions/discord-akairo/BushClient.ts @@ -348,6 +348,7 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re * Starts the bot */ public async start() { + void this.logger.success('version', process.version, false); this.intercept('ready', async (arg, done) => { await this.guilds.fetch(); const promises = this.guilds.cache.map((guild) => { diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..a859a59 --- /dev/null +++ b/start.sh @@ -0,0 +1,4 @@ +#!/bin/zsh +source $NVM_DIR/nvm.sh +nvm install 17.2.0 > /dev/null 2>&1 +~/.nvm/versions/node/v17.2.0/bin/node --experimental-json-modules --no-warnings dist/src/bot.js
\ No newline at end of file |