added function to announce lb updates in the future

This commit is contained in:
Jack 2020-07-09 14:45:47 +01:00
parent f1401d76ef
commit 99abbd7399

View file

@ -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(),
});
}