Skip to content

Commit

Permalink
🎉 NEW: added date to bio
Browse files Browse the repository at this point in the history
  • Loading branch information
casperiv0 committed Nov 29, 2020
1 parent ed95f99 commit 3b3dcba
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,15 @@ async function updateBio(message: string) {
async function init() {
try {
const total = await getWakatimeTotalTime();

const bioMessage = `15y/o programmer and student - Frontend focused web dev. Coded today: ${total}`;
const today = new Date().toLocaleDateString();
const bioMessage = `15y/o programmer and student - Frontend focused web dev. Coded Today (${today}): ${total}`;

await updateBio(bioMessage);

console.log("UPDATE: Successfully updated bio");
} catch (e) {
console.error(e);
}
}

/* Updates bio every 15minutes */
init()
init();
setInterval(init, 900000);

0 comments on commit 3b3dcba

Please sign in to comment.