From 430456a56516754cf06989e00032edf81166d70f Mon Sep 17 00:00:00 2001 From: Christer Date: Sat, 4 Apr 2020 09:23:18 +0300 Subject: [PATCH] Created new function isAuthorDev --- client/class.js | 1 + client/funcs/isAuthorDev.js | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 client/funcs/isAuthorDev.js diff --git a/client/class.js b/client/class.js index cecea16..3c769d5 100644 --- a/client/class.js +++ b/client/class.js @@ -19,6 +19,7 @@ module.exports = class extends Client { this.funcs.check = require('./funcs/check.js'); this.funcs.msToTime = require('./funcs/msToTime.js'); this.funcs.statisticsUpdate = require('./funcs/statisticsUpdate.js'); + this.funcs.isAuthorDev = require('./funcs/isAuthorDev.js'); this.config = require('../config.js'); this.messages = require('./messages.js'); diff --git a/client/funcs/isAuthorDev.js b/client/funcs/isAuthorDev.js new file mode 100644 index 0000000..0d5497d --- /dev/null +++ b/client/funcs/isAuthorDev.js @@ -0,0 +1,10 @@ +module.exports = function (devList, authorID){ + let response = false; + Object.keys(devList).forEach(function(oneDev) { + devID = devList[oneDev]; + if(authorID == devID){ + response = true; + } + }); + return response; +} \ No newline at end of file