mirror of
https://github.com/Technicolor-creamsicle/Osselbot.git
synced 2024-12-21 23:16:23 -05:00
egg
This commit is contained in:
parent
a4e30196be
commit
c6fb55a097
@ -142,7 +142,7 @@ client.on("message", async message => {
|
||||
};
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
if(command === "quote") {
|
||||
let quotes = require(`../quotes.json`);
|
||||
let quotes = require(`${homedir}/quotes.json`);
|
||||
var quoteadd = "";
|
||||
|
||||
var selector;
|
||||
@ -158,8 +158,9 @@ client.on("message", async message => {
|
||||
quoteadd = args;
|
||||
quoteadd = quoteadd.toString();
|
||||
quoteadd = quoteadd.replace(/,/g, " ");
|
||||
quoteadd = quoteadd.replace(/ /g, ", "); quotes.quotes.push(quoteadd.toString());
|
||||
fs.writeFile(`../quotes.json`, JSON.stringify(quotes), (err) => {
|
||||
quoteadd = quoteadd.replace(/ /g, ", ");
|
||||
quotes.quotes.push(quoteadd.toString());
|
||||
fs.writeFile(`${homedir}/quotes.json`, JSON.stringify(quotes), (err) => {
|
||||
if (err) return message.reply("Something went wrong");``
|
||||
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