added bot dao

This commit is contained in:
Miodec 2021-06-07 14:15:09 +01:00
parent 9926c561ac
commit 116d7c8cdb

11
backend/dao/botDAO.js Normal file
View file

@ -0,0 +1,11 @@
const MonkeyError = require("../handlers/error");
const { mongoDB } = require("../init/mongodb");
class BotDAO {
static async addCommand(command, arguments) {
return await mongoDB()
.collection("bot-commands")
.insertOne({ command, arguments, executed: false, requestTimestamp: Date.now() });
}
}
module.exports = BotDAO;