From 41175c0ffd0c316278f7142391e558f3cea29294 Mon Sep 17 00:00:00 2001 From: = Date: Tue, 20 Jul 2021 16:23:30 -0400 Subject: [PATCH] Ability to save phrases to .joint --- commands/roll.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 commands/roll.js diff --git a/commands/roll.js b/commands/roll.js new file mode 100644 index 0000000..be0eb37 --- /dev/null +++ b/commands/roll.js @@ -0,0 +1,15 @@ +const fs = require('fs'); +const strings = require('../src/strings.json'); + +module.exports = { + name: 'roll', + description: 'Add a phrase to the .joint command', + execute(message, file) { + strings.weed.push(file.name); + fs.writeFile('./src/strings.json', JSON.stringify(strings), err => { + if (err) throw err; + + message.channel.send('It has been added to the list'); + }) + } +} \ No newline at end of file