mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-12-09 12:56:07 +08:00
added function to announce lb updates in the future
This commit is contained in:
parent
f1401d76ef
commit
99abbd7399
1 changed files with 9 additions and 0 deletions
|
|
@ -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…
Add table
Reference in a new issue