From 58b431b7571ffb79dbfda2a9a58340039304ce23 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Sat, 23 Mar 2024 17:27:46 -0600 Subject: [PATCH] OH --- index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index c5ec516..095bf80 100644 --- a/index.js +++ b/index.js @@ -5,6 +5,7 @@ const colors = require("colors"); const embeds = require("./embeds.json") const axios = require('axios'); const ping = require("ping") +var commandsBase = require("./commands.json") const ssh2 = require('ssh2') const sshConn = new ssh2.Client(); // find first file in .ssh local to the script @@ -519,9 +520,9 @@ dcClient.on('ready', async () => { ] }; - var commands = await require("./commands.json") - - commands.push(pageCommand) // This is a test, i have *no* idea if this'll work + // make a non reference copy of the commands object + var commands = JSON.parse(JSON.stringify(commandsBase)); + commands.push(pageCommand); (async () => {