From 7a84de548ac492fb08603e504f08852f4300361c Mon Sep 17 00:00:00 2001 From: ultimateplayer1999 Date: Wed, 3 May 2023 09:46:14 +0000 Subject: [PATCH] Moved webport to .env file --- example.env | 7 ++++++- handler/index.js | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/example.env b/example.env index c90936b..0529bb6 100644 --- a/example.env +++ b/example.env @@ -1,7 +1,12 @@ +# BASIC BOT INFO TOKEN= -#Mongodb cloud + +#Mongodb DB_URL= MONGODBUSER= MONGODBPASS= MONGODBCLUSTER= DATABASE= + +#Webstuff +PORT= diff --git a/handler/index.js b/handler/index.js index f3b1b53..4a55ca8 100644 --- a/handler/index.js +++ b/handler/index.js @@ -8,7 +8,7 @@ var cron = require('node-cron'); const moment = require('moment'); const express = require("express"); const app = express(); -const port = 40005 +const port = process.env.PORT const cwd = process.cwd() module.exports = async (client) => { @@ -96,12 +96,12 @@ module.exports = async (client) => { }); // Register for a single guild - await client.guilds.cache.get("239352426451304449").commands.set(arrayOfSlashCommands); + // await client.guilds.cache.get("239352426451304449").commands.set(arrayOfSlashCommands); // Register for a single guild - await client.guilds.cache.get("1075800713323610142").commands.set(arrayOfSlashCommands); + // await client.guilds.cache.get("1075800713323610142").commands.set(arrayOfSlashCommands); // Register for all the guilds the bot is in - // await client.application.commands.set(arrayOfSlashCommands); + await client.application.commands.set(arrayOfSlashCommands); }); // Error handling