{"id":26024390,"url":"https://github.com/miguelmikkey/discordjs-bot-template","last_synced_at":"2026-05-06T14:35:53.724Z","repository":{"id":277564889,"uuid":"932788188","full_name":"miguelmikkey/discordjs-bot-template","owner":"miguelmikkey","description":"This repository is a flexible, modular template for building Discord bots with Discord.js. It’s designed to be easily adapted for a wide range of projects.","archived":false,"fork":false,"pushed_at":"2025-06-21T06:07:10.000Z","size":132,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-18T07:39:33.371Z","etag":null,"topics":["bot","discord","discord-bot","discord-bot-template","discord-js-bot","discord-js-v14","discordjs","javascript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/miguelmikkey.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-14T14:21:53.000Z","updated_at":"2025-08-25T17:33:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"b1651120-d44a-45c2-a199-ed78659dca10","html_url":"https://github.com/miguelmikkey/discordjs-bot-template","commit_stats":null,"previous_names":["miguelmikkey/discord-bot-template","miguelmikkey/discordjs-bot-template"],"tags_count":4,"template":true,"template_full_name":null,"purl":"pkg:github/miguelmikkey/discordjs-bot-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelmikkey%2Fdiscordjs-bot-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelmikkey%2Fdiscordjs-bot-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelmikkey%2Fdiscordjs-bot-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelmikkey%2Fdiscordjs-bot-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miguelmikkey","download_url":"https://codeload.github.com/miguelmikkey/discordjs-bot-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelmikkey%2Fdiscordjs-bot-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32698470,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T08:33:17.875Z","status":"ssl_error","status_checked_at":"2026-05-06T08:33:17.221Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bot","discord","discord-bot","discord-bot-template","discord-js-bot","discord-js-v14","discordjs","javascript"],"created_at":"2025-03-06T12:25:57.155Z","updated_at":"2026-05-06T14:35:53.718Z","avatar_url":"https://github.com/miguelmikkey.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv style=\"text-align:center\" align=\"center\"\u003e\n\n# Discord.js Bot template | 2025 ✅\n\n\u003ca href=\"https://discordjs.guide/\" target=\"_blank\"\u003e![Static Badge](https://img.shields.io/badge/DiscordJS-guide-379C6F)\u003c/a\u003e\n![discordjsversion](https://img.shields.io/badge/discord.js-^14.18.0-5865f2)\n![GitHub contributors](https://img.shields.io/github/contributors/miguelmikkey/discordjs-bot-template?color=blue)\n![GitHub commit activity](https://img.shields.io/github/commit-activity/t/miguelmikkey/discordjs-bot-template)\n![master](https://img.shields.io/github/last-commit/miguelmikkey/discordjs-bot-template/main)\n![Maintenance](https://img.shields.io/maintenance/yes/2025)\n![GitHub Created At](https://img.shields.io/github/created-at/miguelmikkey/discordjs-bot-template)\n![GitHub Repo stars](https://img.shields.io/github/stars/miguelmikkey/discordjs-bot-template)\n\n\u003c/div\u003e\n\n\u003e [!CAUTION]\n\u003e **This repository is the one I personally use as a template for my projects.** Please exercise caution and review the code before using it, as it is modified whenever I need to improve or implement something and may not correspond to the latest release. For better stability, always use the [**latest release**](https://github.com/miguelmikkey/discordjs-bot-template/releases/).\n\n\nThis repository contains a basic template for creating Discord bots using `discord.js`, `pm2` for process management and `.env` for environment variable configuration.\n\n## Features 🎨\n\n- **Basic structure** to start your own project.\n- [**Discord.js**](https://discord.js.org/): Library to interact with the Discord API.\n- [**PM2**](https://pm2.keymetrics.io/): Process manager for Node.js applications, making it easy to run and monitor your bot.\n- [**.env**](https://www.npmjs.com/package/dotenv): Environment variable file to securely manage configuration settings.\n- [**Custom Discord notification ErrorHandler**](https://github.com/miguelmikkey/discordjs-bot-template/blob/main/INSTALLATION.md#7-test-the-bot-): Sometimes you may encounter errors after deploying your bot; that's why I usually link `error handlers` to a channel in a private Discord server so I can get notified.\u003cbr\u003e\n- [**locales**](https://github.com/miguelmikkey/discordjs-bot-template/tree/main/locales/README.md) folder. Theres nothing like supporting multiple languages if you want your bot to be popular, more information about how to use this below.\n- *And much more!*\n\n## To-Do List 📝\n- [x] Base template\n- [x] Slash commands handlers\n- [x] Event handlers\n- [x] Interaction handlers\n- [x] Command options (cooldowns, devonly, database, ...)\n- [x] [Installation](https://github.com/miguelmikkey/discordjs-bot-template/blob/main/INSTALLATION.md) guide\n- [x] MongoDB setup + examples\n- [x] `locale` to support multiple languages\n- [ ] Sharding support for scalability purposes\n- [ ] Support server with test bot\n- [x] `README.md` files on each dir to explain it\n- [x] `Error handling` notification on discord server\n- [ ] `utils` folder filled with utility examples like `embed pagination`, `date formatter`, `validators`, `etc...`\n\n## Get started 😃\n- **Prerequisites and dependencies**\u003cbr\u003e\n    - `node.js` - version 18 or newer **required** 🚨\n    - `discord.js` - version 14.18.0 or newer **required** 🚨\n    - `mongoose` - version 8.12.1 or newer **required** 🚨 *(can be disabled)*\n    - `dotenv` - not required but **recommended**\n    - `pm2` - not required but **recommended**\n        - `npm install pm2 -g` *to install it globally*\n    - `nodemon` - not required but **recommended**\n        - `npm install -g nodemon` *to install it globally*\n\n- **Why this template?** 🤔\u003cbr\u003e\nThis template contains a **versatile** design so you can create **your own** bot regardless of the idea behind it. This repository will be updated with every **discord.js** update, so you won't have to worry about deprecated code.\n\n- **Guides**\n    - 💿 Installation [`INSTALLATION.md`](https://github.com/miguelmikkey/discordjs-bot-template/blob/main/INSTALLATION.md)\n    - 📃 locale (*Multiple languages*) [`./locales/README.md`](https://github.com/miguelmikkey/discordjs-bot-template/tree/main/locales/README.md)\n    - Discord.js [Guide](https://discordjs.guide/#before-you-begin)\n\n## Contributing 💁‍♂️\n\n- Ensure that any new functionality or feature is **general-purpose** and enhances the **template's versatility**. Avoid adding features that are too specialized or tailored to specific use cases.\n- **Add comments** to help understand the code.\n- Use default **prettier** settings. *(ignore `.md` files)*\n- Write clear and descriptive **commit messages**. Each commit should explain the purpose of the change succinctly.\n- **Update and maintain documentation** for any new features or changes. Contributions should include clear explanations of functionality, configuration, and usage examples.\n- **Provide tests for new features when applicable**. Contributions should not break existing functionality.\n\n\u003e [!NOTE]\n\u003e **Im a trainee developer**, Any help or TIPs are welcome. Keep in mind that this is just a template for general-purpose bots; it has to be versatile , efficient, and lightweight. With that said , feel free to fork this repository and submit pull requests. **Contributions are welcome!**\n\n## Useful docs 📚\n- [Mongoose docs](https://mongoosejs.com/docs/) *MongoDB*\n- [PM2 docs](https://pm2.keymetrics.io/docs/usage/quick-start/)\n- [PermissionFlags](https://discord-api-types.dev/api/discord-api-types-v10#PermissionFlagsBits)\n- [SlashCommands](https://discordjs.guide/slash-commands/response-methods.html)\n- [EmbedBuilder](https://discordjs.guide/popular-topics/embeds.html)\n- [ButtonBuilder](https://discordjs.guide/message-components/buttons.html)\n- [ModalBuilder](https://discordjs.guide/interactions/modals.html#building-and-responding-with-modals)\n- [SelectMenus](https://discordjs.guide/message-components/select-menus.html#building-string-select-menus)\n- [Cooldowns](https://discordjs.guide/additional-features/cooldowns.html#resulting-code)\n- [Sharding](https://discordjs.guide/sharding/#when-to-shard)\n- [OAuth2](https://discordjs.guide/oauth2/#a-quick-example)\n## License\n\nThis project is licensed under the [MIT](https://github.com/miguelmikkey/discord-bot-template/blob/main/LICENSE) License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelmikkey%2Fdiscordjs-bot-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiguelmikkey%2Fdiscordjs-bot-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelmikkey%2Fdiscordjs-bot-template/lists"}