Add custom commands

This commit is contained in:
SileNce5k 2021-07-02 11:57:53 +02:00
parent ea65547701
commit 49a3c50980
No known key found for this signature in database
GPG key ID: C507260E7F2583AD
6 changed files with 152 additions and 0 deletions

View 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;
}