mirror of
https://github.com/Technicolor-creamsicle/Osselbot.git
synced 2024-11-18 02:05:54 -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`);
|
||||
var quoteadd = "";
|
||||
let selector = args[0].toLowerCase()
|
||||
try{
|
||||
if(selector === "add") {
|
||||
quoteadd = args.shift();
|
||||
quotes.quotes.push(quoteadd);
|
||||
JSON.stringify(quotes);
|
||||
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`);
|
||||
return message.reply("Quote added to repository");
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user