{"id":25598196,"url":"https://github.com/code0-tech/discord-bot","last_synced_at":"2025-04-13T04:04:52.577Z","repository":{"id":236679622,"uuid":"790428143","full_name":"code0-tech/discord-bot","owner":"code0-tech","description":"Our entertaining discord-bot.","archived":false,"fork":false,"pushed_at":"2025-04-12T21:45:10.000Z","size":1515,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T04:04:22.925Z","etag":null,"topics":["discord","discord-bot","discord-js","javascript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/code0-tech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-04-22T21:28:18.000Z","updated_at":"2025-04-12T21:45:14.000Z","dependencies_parsed_at":"2024-06-06T17:46:26.067Z","dependency_job_id":"7eb8ea16-f74e-47b1-855f-1fe5f3e992a9","html_url":"https://github.com/code0-tech/discord-bot","commit_stats":null,"previous_names":["code0-tech/discord-bot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code0-tech%2Fdiscord-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code0-tech%2Fdiscord-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code0-tech%2Fdiscord-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code0-tech%2Fdiscord-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code0-tech","download_url":"https://codeload.github.com/code0-tech/discord-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248661707,"owners_count":21141450,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["discord","discord-bot","discord-js","javascript"],"created_at":"2025-02-21T13:30:50.153Z","updated_at":"2025-04-13T04:04:52.563Z","avatar_url":"https://github.com/code0-tech.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003ch1\u003eCode0 Discord Bot\u003c/h1\u003e\n\u003c/div\u003e\n\n### Basic Overview:\n\nCode0 is a Discord bot developed in JavaScript, utilizing the discord.js client library along with a lightweight web server for GitHub OAuth authentication. This enables certain commands, such as retrieving commit and pull request data.\n\n\n### Requirements:\n\n- HTTP Port: Required for GitHub OAuth, configured via `http-config.port` in `http-config.json`.\n\n- MongoDB: Used for storing user and bot-related data.\n#\n\n## Main Interactions\n\n|     | Command                                      | Status       | Known Bugs\n| --- | ---------------------------------------------| ------------ | --------- |\n| 1   | `/open-contributer`                          | Finished     |      None |\n| 2   | `/ticket`                                    | Finished     |      None |\n| 3   | `/links`                                     | In Design    |      None |\n| 4   | `/contributor`                               | Finished     |      None |\n| 5   | `/rank` or `/rank @user` +uptodate15         | Finished     |      None |\n| 6   | `/leaderboard` or `/leaderboard limit: 1-20` | Finished     |      None |\n| 7   | `Code0 Application Ticket`                   | Finished     |      None |\n| 8   | `/stats` or `/stats @user` + uptodate15      | Finished     |      None |\n| 9   | `/logs show` or `/logs list`                 | Finished     |      None |\n| 10  | `/debug` for debugging                       | Finished     |      None |\n| 11  | `Git rank message every 24 hours`            | Finished     |      None |\n| 12  | `/git` display charts of Git activity        | In Progress  |      None |\n\n## Tracking\n\nThe bot collects and processes certain statistics, as visible in the source code:\n\n- Message Statistics: Number of messages, words, and characters sent.\n- Voice Statistics: Join/leave events, channel switches, and total voice time.\n\n## GitHub OAuth\nFor /open-contributer, OAuth URLs are not stored. This means authentication is required each time the command is executed.\n\n## Command Tracking\n\nEntrie Example:\n```json\n{\n  \"_id\": {\n    \"$oid\": \"6644f92497346d3e063052fe\"\n  },\n  \"id\": \"380808844093292555\",\n  \"rawxp\": 984,\n  \"stats\": {\n    \"messages\": {\n      \"words\": 4002,\n      \"chars\": 20522,\n      \"count\": 676\n    },\n    \"voice\": {\n      \"joins\": 116,\n      \"switchs\": 18,\n      \"time\": 98093\n    }\n  },\n  \"commandstats\": {\n    \"debug\": {\n      \"command\": 15\n    },\n    \"leaderboard\": {\n      \"command\": 8\n    },\n    \"stats\": {\n      \"command\": 19\n    },\n    \"logs\": {\n      \"command\": 10,\n      \"button\": 13\n    },\n    \"logs list\": {\n      \"selectmenu\": 5\n    },\n    \"links\": {\n      \"command\": 1\n    },\n    \"open-contributor\": {\n      \"command\": 2\n    },\n    \"mydata\": {\n      \"command\": 3\n    },\n    \"git\": {\n      \"autocomplete\": 8,\n      \"command\": 5\n    },\n    \"logs show\": {\n      \"button\": 3\n    },\n    \"ticket\": {\n      \"command\": 1,\n      \"button\": 3\n    },\n    \"_application\": {\n      \"button\": 2\n    },\n    \"rank\": {\n      \"command\": 4\n    }\n  }\n}\n```\n\nLast MongoDB structure update: 13.02.2025\n\n Tip: You can mention a Discord user by their ID using `\u003c@user_id\u003e`.\n\n## Missing Files\nThis repository mirrors the live bot but excludes sensitive or unnecessary files:\n\n- `node_modules/` – Not included (use npm install to generate).\n- `server.env / .env` – Contains private configuration and tokens.\n- `config.json / http-config.json` – Holds role/channel settings and server configurations.\n- `unused-temp.js` – Unused code snippets, kept for reference.\n- `a-workon/` – Work-in-progress features.\n- `.gitignore` – Specifies ignored files.\n\n💡 If you need a setup template, feel free to contact me on Discord: [DC: nixkuchen].\n\n## Documentation\n\nCurrently, no official documentation is available. However, you can explore the bot’s functionality yourself or contact [DC: nixkuchen] for guidance.\n\n## Unused Discord Bot Files\n\nFiles located in `./_app/*` are for Discord server setup (e.g., images).\n\n## Versions\n\nThe bot is fully functional with the following package versions:\n```json\n\"@discordjs/voice\": \"^0.18.0\"     // [04.01.2025]\n\"chartjs-node-canvas\": \"^4.1.6\"   // [04.01.2025]\n\"discord-simpletable\": \"^1.1.6\"   // [08.02.2025]\n\"discord.js\": \"^14.17.3\"          // [08.02.2025]\n\"dotenv\": \"^16.4.7\"               // [04.01.2025]\n\"libsodium-wrappers\": \"^0.7.15\"   // [04.01.2025]\n\"mongo\": \"^0.1.0\"                 // [04.01.2025]\n\"node-fetch\": \"^2.6.12\"           // [04.01.2025]\n\"node-schedule\": \"^2.1.1\"         // [04.01.2025]\n\"puppeteer\": \"^23.11.1\"           // [04.01.2025]\n```\n\n## Commit Naming Conventions\n\n- `wip` – Work in progress.\n- `todo` – Task that needs to be completed.\n- `readme` – README updates.\n- `naming` – Renaming constants, variables, or text.\n- `v/version` – Version updates in package.json.\n\n## What does ... mean?\n\n- uptodate15: This means the message will be updated when changes occur up to 15 more minutes after the interaction execution.\n\n## Code Quality \u0026 Development Philosophy\nSoftware is always evolving, and Code0 is no exception. Here’s why code may sometimes appear incomplete or unpolished:\n\n1. Rapid Development: The goal is to ensure functionality first.\n2. Changing Requirements: Features are frequently adjusted to meet new needs.\n3. Ongoing Refinements: Code is continuously improved for efficiency and maintainability.\n4. Organized Messiness: While some sections may seem unstructured, they function correctly. Any outstanding issues are documented in TODO (index.js).\n5. Fast-Paced Changes: In the early stages, speed often takes priority over perfection.\n\nSince Code0 is actively in development, expect ongoing improvements and changes.\n## Nicusch Versioning System (NVS)\n- `0.0.1` – Minor bug fixes or small functional improvements.\n- `0.1.0` – Command modifications or updates that impact functionality.\n- `1.0.0` – Major changes affecting class structures and breaking compatibility.\n\n💡 This system has been in use since 10.07.2024, but earlier commits may not follow it consistently.\n## Know issues\n\n- 📱 Mobile UI Bug: Tables and charts do not display correctly on mobile devices (Reported: 01.01.2025).\n\n- FATAL ERROR: Reached heap limit Allocation failed (Reported: 8.04.2025).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode0-tech%2Fdiscord-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode0-tech%2Fdiscord-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode0-tech%2Fdiscord-bot/lists"}