{"id":50882323,"url":"https://github.com/gravendev/dj4h","last_synced_at":"2026-06-15T14:01:30.009Z","repository":{"id":305178011,"uuid":"1020910632","full_name":"GravenDev/DJ4H","owner":"GravenDev","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-13T15:53:28.000Z","size":421,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-13T17:24:07.592Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GravenDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-16T15:24:28.000Z","updated_at":"2026-06-13T15:42:43.000Z","dependencies_parsed_at":"2025-08-28T09:16:38.016Z","dependency_job_id":"1343363a-1c5e-423a-9ac9-8c7b18001dbf","html_url":"https://github.com/GravenDev/DJ4H","commit_stats":null,"previous_names":["gravendev/dj4h","asynccommunitydiscord/dj4h"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GravenDev/DJ4H","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GravenDev%2FDJ4H","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GravenDev%2FDJ4H/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GravenDev%2FDJ4H/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GravenDev%2FDJ4H/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GravenDev","download_url":"https://codeload.github.com/GravenDev/DJ4H/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GravenDev%2FDJ4H/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34365597,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-15T14:01:27.799Z","updated_at":"2026-06-15T14:01:29.987Z","avatar_url":"https://github.com/GravenDev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch3 align=\"center\"\u003e\n  \u003cimg src=\"https://avatars.githubusercontent.com/u/78621926?s=200\u0026v=4\" width=\"75\"\u003e\u003cbr/\u003e\n  DJ4H \u003cbr/\u003e\n  This project is under the \u003ca href=\"https://choosealicense.com/licenses/gpl-3.0/\"\u003eGNU GPL v3\u003c/a\u003e license\u003cbr/\u003e\u003cbr/\u003e\n\u003c/h3\u003e\n\n# \u003cp align=\"center\"\u003e`DJ4H`\u003c/p\u003e\n\nAll the projects in the \u003ccode\u003eAsyncCommunityDiscord\u003c/code\u003e organisation are used by the discord server \u003ccode\u003e\ndiscord.gg/graven\u003c/code\u003e both by the moderators and the members.\nMost of the contributors are part of the staff but the members are also allowed to contribute.\n\n---\n\n## Global information\n\n| Global information |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |\n|--------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Description        | DJ4H is a Discord bot designed to enhance server engagement. It includes features for tracking activity engagement, providing a dynamic and interactive experience for communities.                                                                                                                                                                                                                                                                                                                                          |\n| Collaborators      | \u003cimg src=\"https://avatars.githubusercontent.com/u/73261020?v=4\" alt=\"drawing\" width=\"25\"/\u003e [Gamingdy](https://github.com/Gamingdy),  \u003cimg src=\"https://avatars.githubusercontent.com/u/34105327?s=64\u0026v=4\" alt=\"drawing\" width=\"25\"/\u003e [Lindwen](https://github.com/Lindwen), \u003cimg src=\"https://avatars.githubusercontent.com/u/1571189?s=64\u0026v=4\" alt=\"drawing\" width=\"25\"/\u003e [Loïc R](https://github.com/Lramelot),  \u003cimg src=\"https://avatars.githubusercontent.com/u/69684024?s=64\u0026v=4\" alt=\"drawing\" width=\"25\"/\u003e [GabHas](https://github.com/TheRealGabHas) |\n| Version            | 1.0.0                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |\n\n---\n\n## State\n\n![](https://img.shields.io/badge/State-In_production-green?style=for-the-badge)\n\n\u003c!-- Replace with your repository URL --\u003e\n![](https://img.shields.io/github/issues/AsyncCommunityDiscord/DJ4H?style=for-the-badge)\n\n\u003c!-- Replace with your repository URL --\u003e\n![](https://img.shields.io/github/issues-pr/AsyncCommunityDiscord/DJ4H?style=for-the-badge)\n\n---\n\n## About The Project\n\nDJ4H is a Discord bot designed for the \"4-hour Game\" on the Async - Community server (formerly Graven - Développement).\nIts primary purpose is to automate point counting.\n\nAlthough designed for the Async - Community server, the bot can be used on other servers and can run on multiple servers\nsimultaneously.\n\nDJ4H implements a competitive timing game called \"The 4h Game\". Players compete by sending messages in a designated\nchannel after a configurable delay period has passed since the last message.\n\n## Features\n\n- Automatic point counting\n- Leaderboard image generation\n- Player point management (set/view scores)\n\n## Commands\n\nRequired command parameters are shown in brackets (`[required]`) while optional parameters are in parentheses (\n`(optional)`).\n\n### Configuration (Admin only)\n\n| Command | Description |\n| --- | --- |\n| `/config [channel] [delay]` | Sets the game channel and the required delay to score a point. Time prefixes: `s` (seconds), `m` (minutes), `h` (hours), `d` (days). |\n| `/set [member] [score]` | Sets a member's score to the specified value. |\n| `/dump_log` | Retrieves the bot's log file. |\n\n### Player\n\n| Command | Description |\n| --- | --- |\n| `/leaderboard` | Displays an image with the top 10 players. |\n| `/score` | Shows your own score. |\n\n## Installation\n\n### Prerequisites\n\n- Python 3.9+\n- Poetry (for dependency management)\n\n### Steps\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/AsyncCommunityDiscord/DJ4H.git\n   cd DJ4H\n   ```\n2. Install dependencies with Poetry:\n   ```bash\n   poetry install\n   ```\n\n## Configuration\n\nCreate a `.env` file in the project root with the following variables:\n\n```env\nBOT_TOKEN=your_discord_bot_token\nDEBUG_GUILD_ID=your_dev_server_id  # Optional\nDATABASE_PATH=dj4h.db              # Optional, defaults to dj4h.db\n```\n\n- `BOT_TOKEN`: Your Discord bot token (required).\n- `DEBUG_GUILD_ID`: Discord server ID for development (optional).\n- `DATABASE_PATH`: Path to the SQLite database file (optional).\n\n## Usage\n\n### Development Mode\n\n```bash\n# Run the bot\npoetry run python main.py\n```\n\n### Production Mode with Docker\n\n```bash\n# Build and run with Docker Compose\ndocker-compose -f compose-prod.yml up -d\n```\n\n### Development Mode with Docker\n\n```bash\n# Build and run with Docker Compose\ndocker-compose up -d\n```\n\n## Development\n\n### Code Formatting\n\n```bash\n# Format code with Black\npoetry run black .\n```\n\n### Project Structure\n\n```\nDJ4H/\n├── main.py                    # Entry point\n├── config.py                  # Configuration and logging\n├── commands/                  # Discord commands\n│   ├── cogs/game.py          # /leaderboard and /score commands\n��   └── handler/events.py     # Main game logic\n├── utils/\n│   ├── database/             # Database layer\n│   │   ├── connection.py     # SQLite connection\n│   │   ├── schema.py         # Data models\n│   │   └── dao/              # Data Access Objects\n│   └── image_generator.py    # Image generation for leaderboard\n└── docker/                   # Docker configuration\n```\n\n## Database\n\nThe bot uses SQLite with three main tables:\n\n- `guilds`: Server configuration (channel, delay).\n- `users`: User scores per server.\n- `messages`: Message tracking for game logic.\n\n## Support\n\nTo report bugs or request features, please create an issue on the GitHub repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgravendev%2Fdj4h","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgravendev%2Fdj4h","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgravendev%2Fdj4h/lists"}