Discord Clocking Bot
2026-02
This project is a Discord bot that tracks team work sessions directly from slash commands and writes results to Google Sheets in real time. Users can clock in, clock out with task notes, and manually add missed time. The bot also visualizes worked hours and pooled company funds in chart embeds, making operational data visible in-channel without opening external dashboards.
Key Features
- Slash command based time tracking with /in, /out, and /add
- Google Sheets integration for persistent logging and calculations
- Automatic worked-time computation in minutes and decimal hours
- QuickChart-powered pie chart embeds for total hours and pool distributions
- Shared cash pool commands for filling, draining, and risk visibility
# Background
The bot was built to simplify internal hour tracking and pool accounting inside a Discord-first workflow. Instead of switching between chat and spreadsheets manually, team members can register work sessions directly where they already communicate.
# Functionality
The /in command stores a timestamped session start in Google Sheets. The /out command fetches the latest start entry, calculates the elapsed time, updates the sheet with duration and work description, and replies with a summary embed. The /add command allows manual correction for missed sessions. On top of time tracking, /fill and /drain update a shared financial pool model, while /well and /risk visualize ownership and risk distribution using generated pie charts.
# Commands
Main commands implemented in this version:
-
-
-
-
-
-
-
-
-
-
/in-
/out-
/add-
/time-
/fill-
/drain-
/well-
/risk-
/suprise# Technical Notes
The bot dynamically loads command and event modules from folder structure at startup and registers slash commands through Discord REST routes. Data persistence is handled by Google Sheets API with a service credential file, while charts are rendered through QuickChart URLs and sent as Discord embeds.