Browse Source

the magic of repl

canary
Alex 2 years ago
committed by repl.it user
parent
commit
dad83d5001
  1. 7
      quotes.json
  2. 4
      src/index.js

7
quotes.json

@ -1,6 +1 @@
{
"quotes": [
"you can add quotes by running ?quote add <person> Quote goes here",
"tech,is,bad,at,sneezing"
]
}
{"quotes":["you can add quotes by running ?quote add <person> Quote goes here","techt parm arm zarm","<@!258325046869622785> I HATE JS."]}

4
src/index.js

@ -157,10 +157,6 @@ client.on("message", async message => {
args.shift();
//This does logic to make it from an array to a nice string.
quoteadd = args.join(' ');
//quoteadd = quoteadd.toString();
//quoteadd = quoteadd.replace(/,/g, " ");
//quoteadd = quoteadd.replace(/ /g, ", ");
//quotes.quotes.push(quoteadd.toString());
quotes.quotes.push(quoteadd)
fs.writeFile(`${homedir}/quotes.json`, JSON.stringify(quotes), (err) => {
if (err) return message.reply("Something went wrong");``

Loading…
Cancel
Save