mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-10 07:36:09 +08:00
not used for now
This commit is contained in:
parent
6014620596
commit
1a9973e786
1 changed files with 17 additions and 19 deletions
|
@ -2,14 +2,12 @@ const MonkeyError = require("../handlers/error");
|
|||
const { mongoDB } = require("../init/mongodb");
|
||||
|
||||
async function addCommand(command, arguments) {
|
||||
return await mongoDB()
|
||||
.collection("bot-commands")
|
||||
.insertOne({
|
||||
command,
|
||||
arguments,
|
||||
executed: false,
|
||||
requestTimestamp: Date.now(),
|
||||
});
|
||||
return await mongoDB().collection("bot-commands").insertOne({
|
||||
command,
|
||||
arguments,
|
||||
executed: false,
|
||||
requestTimestamp: Date.now(),
|
||||
});
|
||||
}
|
||||
|
||||
class BotDAO {
|
||||
|
@ -21,17 +19,17 @@ class BotDAO {
|
|||
return await addCommand("linkDiscord", [discordId, uid]);
|
||||
}
|
||||
|
||||
static async announceLbUpdate(discordId, pos, lb, wpm, raw, acc, con) {
|
||||
return await addCommand("sayLbUpdate", [
|
||||
discordId,
|
||||
pos,
|
||||
lb,
|
||||
wpm,
|
||||
raw,
|
||||
acc,
|
||||
con,
|
||||
]);
|
||||
}
|
||||
// static async announceLbUpdate(discordId, pos, lb, wpm, raw, acc, con) {
|
||||
// return await addCommand("sayLbUpdate", [
|
||||
// discordId,
|
||||
// pos,
|
||||
// lb,
|
||||
// wpm,
|
||||
// raw,
|
||||
// acc,
|
||||
// con,
|
||||
// ]);
|
||||
// }
|
||||
|
||||
// this probably will be rewritten but keeping the old code just in case
|
||||
// static async announceDailyLbResult(lbdata) {
|
||||
|
|
Loading…
Add table
Reference in a new issue