Add helper function for bot settings
and fix registration check always returning true
This commit is contained in:
9
util/general.js
Normal file
9
util/general.js
Normal file
@@ -0,0 +1,9 @@
|
||||
const { Bot } = require("../models");
|
||||
|
||||
module.exports = {
|
||||
name: "GeneralUtils",
|
||||
getBotProperty: async function(property) {
|
||||
let bot = await Bot.findOne();
|
||||
return property ? bot[property] : bot;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user