diff --git a/backend/dao/botDAO.js b/backend/dao/botDAO.js new file mode 100644 index 000000000..801b8d485 --- /dev/null +++ b/backend/dao/botDAO.js @@ -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; \ No newline at end of file