An enterprise-grade automated attendance tracker, frequency reporter, and timesheet manager engineered for Discord servers.
PontoBot is a reliable, high-performance Discord bot engineered to track team attendance, generate comprehensive frequency reports, and streamline organizational data management directly inside your server ecosystem.
Built on modern asynchronous architectures utilizing discord.py and Tortoise ORM, it provides seamless multi-tenant isolation per Discord guild. All server rules, access layers, and operational histories are securely persisted to a zero-configuration SQLite local instance (upgradeable to PostgreSQL). The bot also ships with a full internationalization layer supporting English and Brazilian Portuguese out of the box, with native Discord slash-command locale integration.
- β‘ Zero-Friction Onboarding: Automated server configuration executed by an intuitive, step-by-step interactive configuration wizard.
- β° Legacy & Slash Support: Supports lightning-fast classic text commands (
!ponto) for active workflows and rich Slash Commands for data inspection. - π Granular Reporting Modules: Export highly customizable timesheet profiles filtered by targeted user, distinct dates, or specific community milestones.
- π Leaderboards & Engagement: Dynamic ranking grids showcasing your most consistent community or team operators.
- π‘οΈ Resilient Recovery Layer: Built-in fault tolerance that queues and logs disrupted events during brief internet drops or system outages.
- π Multilingual: Native Discord locale detection with full English and Brazilian Portuguese support.
| Command | Operational Scope | Context Description |
|---|---|---|
!ponto (alias !checkin) |
π Tracking Channel Only | Creates a chronological attendance timestamp for the message author. |
| Command | Access Layer | Functional Execution |
|---|---|---|
/setup_pontobot |
βοΈ Administrator | Initializes the interactive server configuration engine. |
/attendance |
π₯ Member / Admin | Extracts specific historical logs over customizable intervals. |
/ranking |
π Public | Visualizes community interaction metrics in real-time. |
/management |
πΌ Manager Role | Displays telemetry parameters and raw diagnostic streams. |
Ensure your host machine fits the following baselines:
- Runtime Engine: Python version
3.12or higher installed. - Package Manager:
uv(recommended) orpip. - Gateway Credentials: A distinct Discord Token derived from the official Discord Developer Portal.
- Gateway Privileges: Explicit validation for
Message ContentandGuild MembersPrivileged Intents inside your application control panel.
# Clone the repository
git clone https://github.com/vinifreittas/pontobot.git
cd pontobot
# Install dependencies via uv (recommended)
uv syncImportant
Never persist raw API credentials directly inside code files. Always supply environment configurations via system environment variables or a secure secret manager.
export DISCORD_TOKEN="your-super-secret-bot-token"Optional environment variables:
| Variable | Default | Description |
|---|---|---|
DISCORD_TOKEN |
(required) | Bot authentication token |
DATABASE_URL |
sqlite://db.sqlite3 |
Tortoise ORM database URL |
SYNC_COMMANDS |
false |
Sync global slash commands on startup |
LOG_LEVEL |
INFO |
Logging verbosity (DEBUG, INFO, WARNING, ERROR) |
uv run python main.pyWhen PontoBot joins your Discord server, complete these setup steps:
- Target a safe operational tracking text channel.
- Call the administrative initialization command:
/setup_pontobot. - Provide the following configuration arguments via the interactive wizard:
βββ Manager Role --> Authorized group allowed to call management views
βββ Tag Role --> Target users subjected to tracking parameters
βββ Target Channel --> The restricted channel allocated for text check-ins (!ponto)
βββ Timezone --> Dynamic time offset (e.g., America/Sao_Paulo, Europe/London)
src/
βββ pontobot/
βββ bot.py # PontoBot client bootstrap & cog auto-loader
βββ cogs/ # Discord Cog subpackages
β βββ attendance/ # !ponto check-in, /attendance reports, /ranking
β βββ management/ # /management dashboard & log stream
β βββ setup/ # /setup_pontobot configuration wizard
βββ database/ # Tortoise ORM models, DatabaseManager DAL, migrations
βββ i18n/ # Internationalization (TranslationManager, PontoBotTranslator, locales/)
βββ utils/ # Shared utilities (embeds, logger, views, constants)
tests/ # pytest test suite
main.py # Entry point
- Data Isolation: Configuration schemes are parsed per guild. Multiple Discord servers can share a single bot instance completely independently, without data pollution.
- Default Database Engine: Uses SQLite for local zero-configuration deployment. Easily upgradeable to PostgreSQL via the
DATABASE_URLenvironment variable and Tortoise ORM configuration. - Internationalization: The
PontoBotTranslatorintegrates with Discord's native locale detection to render slash command descriptions and response strings in the user's locale. The guild's configured language (Guild.language) is persisted in the database and used as a fallback when a Discord locale is not available. - Dependency Direction:
database / utils / i18nβcogsβbotβmain.py. Lower layers never import from higher ones.
Distributed completely open-source under the guidelines of the MIT License. For complete compliance requirements, see the full LICENSE file.