mirror of
https://github.com/Technicolor-creamsicle/Osselbot.git
synced 2024-12-22 07:26:22 -05:00
egg
This commit is contained in:
parent
a4e30196be
commit
c6fb55a097
@ -142,7 +142,7 @@ client.on("message", async message => {
|
|||||||
};
|
};
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
if(command === "quote") {
|
if(command === "quote") {
|
||||||
let quotes = require(`../quotes.json`);
|
let quotes = require(`${homedir}/quotes.json`);
|
||||||
var quoteadd = "";
|
var quoteadd = "";
|
||||||
|
|
||||||
var selector;
|
var selector;
|
||||||
@ -158,8 +158,9 @@ client.on("message", async message => {
|
|||||||
quoteadd = args;
|
quoteadd = args;
|
||||||
quoteadd = quoteadd.toString();
|
quoteadd = quoteadd.toString();
|
||||||
quoteadd = quoteadd.replace(/,/g, " ");
|
quoteadd = quoteadd.replace(/,/g, " ");
|
||||||
quoteadd = quoteadd.replace(/ /g, ", "); quotes.quotes.push(quoteadd.toString());
|
quoteadd = quoteadd.replace(/ /g, ", ");
|
||||||
fs.writeFile(`../quotes.json`, JSON.stringify(quotes), (err) => {
|
quotes.quotes.push(quoteadd.toString());
|
||||||
|
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`);
|
||||||
return message.reply("Quote added to repository");
|
return message.reply("Quote added to repository");
|
||||||
|
Loading…
Reference in New Issue
Block a user