From 9239d10a6fc860c3a57f755465896c0206a3b415 Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 25 May 2020 18:31:10 -0500 Subject: [PATCH] asdfghjk --- src/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 4773b50..f8bcec7 100755 --- a/src/index.js +++ b/src/index.js @@ -144,12 +144,12 @@ client.on("message", async message => { if(command === "quote") { let quotes = require(`${homedir}/quotes.json`); var quoteadd = ""; - let selector = args[0].toLowerCase() try{ + let selector = args[0].toLowerCase(); if(selector === "add") { args.shift(); - quoteadd = args - quotes.quotes.push(quoteadd); + quoteadd = args; + quotes.quotes.push(stringify(quotes)); fs.writeFile(`${homedir}/quotes.json`, JSON.stringify(quotes), (err) => { if (err) return message.reply("Something went wrong"); client.channels.cache.get('712084662033580064').send(`${message.member} has submitted ${quoteadd} to the quote repository`);