monkeytype/backend/dao/botDAO.js
2021-06-07 14:15:09 +01:00

11 lines
342 B
JavaScript

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;