Move custom command files into own directory
This commit is contained in:
parent
e6bf4045ed
commit
4e41a035ed
9 changed files with 8 additions and 8 deletions
13
util/custom_commands/getAllCustomCommands.js
Normal file
13
util/custom_commands/getAllCustomCommands.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
const fs = require('fs');
|
||||
module.exports = function(){
|
||||
const customPath = './data/customCommands.json';
|
||||
let list = "";
|
||||
|
||||
let json = fs.readFileSync(customPath, 'utf8');
|
||||
let customCommands = JSON.parse(json)
|
||||
customCommands.forEach(function (customCommand) {
|
||||
list = list + customCommand.customName+"\n";
|
||||
});
|
||||
|
||||
return list;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue