mirror of
https://github.com/Technicolor-creamsicle/Osselbot.git
synced 2025-02-21 05:07:16 -05:00
a
This commit is contained in:
parent
174737a4a4
commit
b75e153a1a
@ -146,13 +146,13 @@ client.on("message", async message => {
|
||||
};
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
if(command === "quote") {
|
||||
const quotes = require('~/quotes.json');
|
||||
const quotes = require(`${HOME}/quotes.json`);
|
||||
const quoteadd = "";
|
||||
if(toLowerCase(args[0]) === "add") {
|
||||
quoteadd = args.shift();
|
||||
quotes.quotes.push(quoteadd);
|
||||
JSON.stringify(quotes);
|
||||
fs.createWriteStream("~/quotes.json", quotes, {emitClose: "true"});
|
||||
fs.createWriteStream(`${HOME}/quotes.json`, quotes, {emitClose: "true"});
|
||||
client.channels.get('712084662033580064').send(`${message.member} has submitted ${quote} to the quote repository`);
|
||||
return message.reply("Quote added to repository");
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user