mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-21 15:56:24 +08:00
added function to announce lb updates in the future
This commit is contained in:
parent
f1401d76ef
commit
99abbd7399
|
@ -1080,3 +1080,12 @@ exports.scheduledFunctionCrontab = functions.pubsub
|
|||
console.error(`error while moving daily leaderboards to history - ${e}`);
|
||||
}
|
||||
});
|
||||
|
||||
async function announceLbUpdate(discordId, pos, lb, wpm) {
|
||||
db.collection("bot-commands").add({
|
||||
command: "updateRole",
|
||||
arguments: [discordId, pos, lb, wpm],
|
||||
executed: false,
|
||||
requestTimestamp: Date.now(),
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue