mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-11-12 02:17:21 +08:00
11 lines
342 B
JavaScript
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;
|