Add helper function for bot settings

and fix registration check always returning true
This commit is contained in:
Minz committed 2022-08-19 14:14:24 +02:00
1 parent ae60732836
commit 51e90dee8a
5 files changed
+36 -5

No files matched your search

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