asdfghjk
This commit is contained in:
parent
abb41e182e
commit
9239d10a6f
|
@ -144,12 +144,12 @@ client.on("message", async message => {
|
||||||
if(command === "quote") {
|
if(command === "quote") {
|
||||||
let quotes = require(`${homedir}/quotes.json`);
|
let quotes = require(`${homedir}/quotes.json`);
|
||||||
var quoteadd = "";
|
var quoteadd = "";
|
||||||
let selector = args[0].toLowerCase()
|
|
||||||
try{
|
try{
|
||||||
|
let selector = args[0].toLowerCase();
|
||||||
if(selector === "add") {
|
if(selector === "add") {
|
||||||
args.shift();
|
args.shift();
|
||||||
quoteadd = args
|
quoteadd = args;
|
||||||
quotes.quotes.push(quoteadd);
|
quotes.quotes.push(stringify(quotes));
|
||||||
fs.writeFile(`${homedir}/quotes.json`, JSON.stringify(quotes), (err) => {
|
fs.writeFile(`${homedir}/quotes.json`, JSON.stringify(quotes), (err) => {
|
||||||
if (err) return message.reply("Something went wrong");
|
if (err) return message.reply("Something went wrong");
|
||||||
client.channels.cache.get('712084662033580064').send(`${message.member} has submitted ${quoteadd} to the quote repository`);
|
client.channels.cache.get('712084662033580064').send(`${message.member} has submitted ${quoteadd} to the quote repository`);
|
||||||
|
|
Loading…
Reference in New Issue