nyx

The first CODM discrod bot -- cath.exe Template
git clone https://codeberg.org/night0721/nyx
Log | Files | Refs | LICENSE

commit 74348b708f58925196ae60dc8c46c31aab410cb9
parent 55b35a0e11c50c9f126b7ee3253d92a48eb4640b
Author: NK <[email protected]>
Date:   Fri, 14 Apr 2023 14:44:37 +0100

fix

Diffstat:
Mclient/NYX.js | 8+++++---
Mpackage.json | 5++---
2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/client/NYX.js b/client/NYX.js @@ -32,8 +32,8 @@ class NYX extends Client { ], intents: [ GatewayIntentBits.Guilds, - GatewayIntentBits.GuildMembers, - GatewayIntentBits.MessageContent, + // GatewayIntentBits.GuildMembers, + // GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMessages, GatewayIntentBits.DirectMessageTyping, GatewayIntentBits.DirectMessages, @@ -68,7 +68,9 @@ class NYX extends Client { start() { require("../util/dist/handler")(this); - this.login(process.env.TOKEN); + this.login( + process.argv[2] == "--dev" ? process.env.DEV : process.env.TOKEN + ); this.data .connect(process.env.MONGO) .then(() => console.log("Connected to MongoDB ✅")) diff --git a/package.json b/package.json @@ -8,9 +8,8 @@ }, "main": "index.js", "scripts": { - "dev": "nodemon .", - "start": "node .", - "lint": "eslint .", + "dev": "node . --dev", + "start": "node . --prod", "node-update": "npm i --save-dev node@17 && npm config set prefix=$(pwd)/node_modules/node && export PATH=$(pwd)/node_modules/node/bin:$PATH", "node-clean": "rm -rf node_modules && rm package-lock.json && npm cache clear --force && npm cache clean --force && npm i", "all": "npm run node-update && npm run node-clean"