mirror of
https://github.com/Technicolor-creamsicle/Osselbot.git
synced 2025-01-20 05:06:22 -05:00
look at this
This commit is contained in:
parent
fdb14602c3
commit
02f9f7e643
@ -145,13 +145,14 @@ client.on("message", async message => {
|
|||||||
let quotes = require(`${homedir}/quotes.json`);
|
let quotes = require(`${homedir}/quotes.json`);
|
||||||
var quoteadd = "";
|
var quoteadd = "";
|
||||||
let selector = args[0].toLowerCase()
|
let selector = args[0].toLowerCase()
|
||||||
|
try{
|
||||||
if(selector === "add") {
|
if(selector === "add") {
|
||||||
quoteadd = args.shift();
|
quoteadd = args.shift();
|
||||||
quotes.quotes.push(quoteadd);
|
quotes.quotes.push(quoteadd);
|
||||||
JSON.stringify(quotes);
|
|
||||||
fs.writeFile(`${homedir}/quotes.json`, JSON.stringify(quotes), (err) => {
|
fs.writeFile(`${homedir}/quotes.json`, JSON.stringify(quotes), (err) => {
|
||||||
return message.reply("Something went wrong");
|
if (err) return message.reply("Something went wrong");
|
||||||
});
|
});
|
||||||
|
} catch (error) {};
|
||||||
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`);
|
||||||
return message.reply("Quote added to repository");
|
return message.reply("Quote added to repository");
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user