This commit is contained in:
NK 2023-04-14 14:44:37 +01:00
parent 55b35a0e11
commit 74348b708f
2 changed files with 7 additions and 6 deletions

View file

@ -32,8 +32,8 @@ class NYX extends Client {
], ],
intents: [ intents: [
GatewayIntentBits.Guilds, GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMembers, // GatewayIntentBits.GuildMembers,
GatewayIntentBits.MessageContent, // GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMessages,
GatewayIntentBits.DirectMessageTyping, GatewayIntentBits.DirectMessageTyping,
GatewayIntentBits.DirectMessages, GatewayIntentBits.DirectMessages,
@ -68,7 +68,9 @@ class NYX extends Client {
start() { start() {
require("../util/dist/handler")(this); require("../util/dist/handler")(this);
this.login(process.env.TOKEN); this.login(
process.argv[2] == "--dev" ? process.env.DEV : process.env.TOKEN
);
this.data this.data
.connect(process.env.MONGO) .connect(process.env.MONGO)
.then(() => console.log("Connected to MongoDB ✅")) .then(() => console.log("Connected to MongoDB ✅"))

View file

@ -8,9 +8,8 @@
}, },
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"dev": "nodemon .", "dev": "node . --dev",
"start": "node .", "start": "node . --prod",
"lint": "eslint .",
"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-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", "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" "all": "npm run node-update && npm run node-clean"