monkeytype/backend/dao/botDAO.js

11 lines
342 B
JavaScript
Raw Normal View History

2021-06-07 21:15:09 +08:00
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;