{"id":19680995,"url":"https://github.com/codewars/discord-bot","last_synced_at":"2025-04-29T04:31:49.407Z","repository":{"id":40524123,"uuid":"377766425","full_name":"codewars/discord-bot","owner":"codewars","description":"Codewars Discord Bot","archived":false,"fork":false,"pushed_at":"2024-01-04T00:57:55.000Z","size":465,"stargazers_count":21,"open_issues_count":4,"forks_count":10,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-04-14T11:04:39.275Z","etag":null,"topics":["discord","discord-bot"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codewars.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-06-17T08:56:06.000Z","updated_at":"2024-01-10T14:16:27.000Z","dependencies_parsed_at":"2023-10-12T08:12:04.662Z","dependency_job_id":null,"html_url":"https://github.com/codewars/discord-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewars%2Fdiscord-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewars%2Fdiscord-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewars%2Fdiscord-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewars%2Fdiscord-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codewars","download_url":"https://codeload.github.com/codewars/discord-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224151624,"owners_count":17264436,"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"],"created_at":"2024-11-11T18:06:41.399Z","updated_at":"2024-11-11T18:06:42.009Z","avatar_url":"https://github.com/codewars.png","language":"TypeScript","readme":"# Codewars Discord Bot\n\n[![Discord chat](https://img.shields.io/discord/846624424199061524.svg?logo=discord\u0026style=flat)](https://discord.gg/mSwJWRvkHA)\n[![CI](https://github.com/codewars/discord-bot/workflows/CI/badge.svg)](https://github.com/codewars/discord-bot/actions?query=workflow%3ACI)\n[![License MIT](https://img.shields.io/github/license/codewars/discord-bot)](./LICENSE)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat)](https://github.com/prettier/prettier)\n\nThe official Discord bot for Codewars.\n\n## Project Status\n\nEarly stage. Expect breaking changes.\n\nFeedback is appreciated (Discord or GitHub issues/discussions).\n\n## Configuration\n\nThe following environment variables are required:\n\n- `BOT_TOKEN`: The token used to log in.\n- `CLIENT_ID`: The ID of the application associated with the bot.\n- `GUILD_ID`: The ID of the server where slash commands should be registered.\n\nUse `.env.development` (gitignored) to configure these variables.\n\n## Development Setup\n\n\u003e NOTE: Please discuss with us first before adding new features to avoid wasting your time.\n\nBefore working on this repo, you should already have [set up a bot account](https://discordjs.guide/preparations/setting-up-a-bot-application.html#creating-your-bot) and [added it to your development server](https://discordjs.guide/preparations/adding-your-bot-to-servers.html), with at least the following permissions:\n\n- `applications.commands`: Enables the use of slash commands\n- `bot`: Enables your application to join the server as a bot\n  - `SEND_MESSAGES`: Enables your bot to send messages to channels\n  - `MANAGE_MESSAGES`: Enables your bot to edit server messages and reactions\n\nYou also need to enable the `MESSAGE CONTENT INTENT` for your bot.\n\nIn order to mimic the Codewars Discord server in your development server, you may also wish to add appropriate roles such as `@admin`, `@mods` and `@power-users`, as well as common channels such as `#help-solve` and `#bot-playground`.\n\n### Making Changes\n\n1. Fork this repo\n1. Clone the fork to your local development environment, assuming `GITHUB_USERNAME` is set to your GitHub username:\n\n   ```bash\n   $ git clone git@github.com:\"$GITHUB_USERNAME\"/discord-bot.git\n   ```\n\n1. Make this project your working directory\n1. Install dependencies and compile TypeScript\n\n   ```bash\n   $ npm install\n   ```\n\n1. Start TypeScript compiler process to recompile on change:\n\n   ```bash\n   $ npm run build:watch\n   ```\n\n1. In a new terminal session, copy `.env.example` to `.env.development`:\n\n   ```bash\n   $ cp .env.example .env.development\n   ```\n\n1. In `.env.development`:\n   - Set `BOT_TOKEN` to your [bot token](https://discordjs.guide/preparations/setting-up-a-bot-application.html#your-token)\n   - Set `CLIENT_ID` and `GUILD_ID` to your [application ID and server ID](https://support-dev.discord.com/hc/en-us/articles/360028717192-Where-can-I-find-my-Application-Team-Server-ID-), respectively\n1. Start the bot:\n\n   ```bash\n   $ npm start\n   ```\n\nAfter confirming that the bot works as expected, make changes to the local copy of your fork as appropriate and test your changes by restarting the bot.\n\n### Adding a new command\n\nRun `npx plop command` to generate boilerplate. You will be asked to enter the name of the command (lowercase English letters only) which should be a verb and select an associated category.\n\nIf your command belongs to a category that does not exist yet, stop the command generation by pressing `Ctrl-C`, then modify `plopfile.mjs` as appropriate to add your category and re-run `npx plop command`.\n\n### Adding a new message handler\n\nRun `npx plop message-handler` to generate boilerplate.\n\n### Code Style\n\n[Prettier](https://prettier.io/) is used to ensure consistent style. We use the defaults except for `printWidth: 100` because `80` is often too narrow with types.\n\n`pre-commit` hook to format staged changes is installed automatically when you run `npm install`, so you don't need to do anything. However, it's recommended to [configure your editor](https://prettier.io/docs/en/editors.html) to format on save, and forget about formatting.\n\n## License\n\n[MIT](./LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewars%2Fdiscord-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodewars%2Fdiscord-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewars%2Fdiscord-bot/lists"}