Cleaning input

This commit is contained in:
= 2021-07-20 16:32:16 -04:00
parent 3e7b55e377
commit 96d6ca4539

View File

@ -1,12 +1,13 @@
const fs = require('fs'); const fs = require('fs');
const strings = require('../src/strings.json'); const strings = require('../src/strings.json');
const functions = require('../functions.js');
module.exports = { module.exports = {
name: 'roll', name: 'roll',
description: 'Add a phrase to the .joint command', description: 'Add a phrase to the .joint command',
usage: '<phrase to save>', usage: '<phrase to save>',
execute(message, file) { execute(message, file) {
strings.weed.push(file.name); strings.weed.push(functions.cleanInput(file.name));
fs.writeFile('./src/strings.json', JSON.stringify(strings), err => { fs.writeFile('./src/strings.json', JSON.stringify(strings), err => {
if (err) throw err; if (err) throw err;