{"id":14983280,"url":"https://github.com/peterthehan/create-discord-bot","last_synced_at":"2026-02-26T02:20:21.594Z","repository":{"id":32903282,"uuid":"116322493","full_name":"peterthehan/create-discord-bot","owner":"peterthehan","description":"A module-based Discord bot template.","archived":false,"fork":false,"pushed_at":"2023-07-18T23:21:50.000Z","size":505,"stargazers_count":165,"open_issues_count":5,"forks_count":82,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-04-10T01:09:36.100Z","etag":null,"topics":["bootstrap","bot","discord","discord-bot","discordjs","framework","modules","nodejs","plugin","template","widget"],"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/peterthehan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","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},"funding":{"github":["peterthehan"],"patreon":"peterthehan","ko_fi":"peterthehan","custom":["https://paypal.me/peterthehan","https://venmo.com/peterthehan"]}},"created_at":"2018-01-05T00:49:51.000Z","updated_at":"2025-03-10T20:21:48.000Z","dependencies_parsed_at":"2025-01-16T06:21:24.285Z","dependency_job_id":null,"html_url":"https://github.com/peterthehan/create-discord-bot","commit_stats":{"total_commits":195,"total_committers":4,"mean_commits":48.75,"dds":0.06153846153846154,"last_synced_commit":"03ec44a60fc1c9d50ca4d8504f8798caf7be7f10"},"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterthehan%2Fcreate-discord-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterthehan%2Fcreate-discord-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterthehan%2Fcreate-discord-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterthehan%2Fcreate-discord-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterthehan","download_url":"https://codeload.github.com/peterthehan/create-discord-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137886,"owners_count":21053775,"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":["bootstrap","bot","discord","discord-bot","discordjs","framework","modules","nodejs","plugin","template","widget"],"created_at":"2024-09-24T14:07:00.244Z","updated_at":"2026-02-26T02:20:21.542Z","avatar_url":"https://github.com/peterthehan.png","language":"TypeScript","funding_links":["https://github.com/sponsors/peterthehan","https://patreon.com/peterthehan","https://ko-fi.com/peterthehan","https://paypal.me/peterthehan","https://venmo.com/peterthehan"],"categories":[],"sub_categories":[],"readme":"# Create Discord Bot\n\n[![Discord](https://discord.com/api/guilds/258167954913361930/embed.png)](https://discord.gg/WjEFnzC) [![Twitter Follow](https://img.shields.io/twitter/follow/peterthehan.svg?style=social)](https://twitter.com/peterthehan)\n\nA module-based Discord bot template.\n\n## Getting started\n\n### Register a Discord bot application\n\n1. Go to Discord's [Developer Portal](https://discord.com/developers/applications).\n2. Create a new application.\n\n   \u003e Take note of the `APPLICATION ID` on the General Information tab page. You will need it to invite the bot to your server in step 5.\n\n3. Go to the Bot tab and add a bot user to your application.\n\n   \u003e Take note of the `TOKEN` on the Bot tab page. You will need it in step 3 of the next section.\n\n   \u003e Keep your token and any file containing it **private**. If it ever leaks or you suspect it may have leaked, simply `regenerate` a new token to invalidate your compromised token.\n\n4. While in the Bot tab, scroll down to the Privileged Gateway Intents section and enable the toggles for both `Presence Intent` and `Server Members Intent`. More information on Gateway Intents can be found here:\n\n   - [Gateway Update FAQ](https://support-dev.discord.com/hc/en-us/articles/360056426994)\n   - [Privileged Intents](https://discord.com/developers/docs/topics/gateway#privileged-intents)\n\n5. Lastly, invite the bot to your server using the following link template: [https://discord.com/oauth2/authorize?scope=bot\u0026client_id=APPLICATION_ID_HERE](https://discord.com/oauth2/authorize?scope=bot\u0026client_id=APPLICATION_ID_HERE)\n\n### Create a Discord bot project\n\n1. Run the following commands to bootstrap a Discord bot project in your working directory:\n\n   \u003e Replace `my-discord-bot` in the commands below with your own preferred project name!\n\n   ```\n   npx degit peterthehan/create-discord-bot my-discord-bot\n   ```\n\n   ```\n   cd my-discord-bot\n   ```\n\n   ```\n   npm i\n   ```\n\n2. Run the following command to rename the existing `.env.example` file to `.env`:\n\n   ```\n   mv .env.example .env\n   ```\n\n3. Open the `.env` file and add your Discord bot token.\n\n4. Lastly, run the following command to start the bot:\n\n   ```\n   npm start\n   ```\n\n   Verify the bot is running properly by sending messages in your server. The bot should log these messages in your terminal. If there are any issues, check [Troubleshooting](#troubleshooting).\n\nYou're ready to create your own Discord bot! 🎉\n\nIf you were directed to follow the instructions found here from another `README`, return back there now and continue with the setup. Feel free to continue reading for more information.\n\n## Bots\n\nThe following bots can be used by this template by adding them into the [/src/bots](./src/bots) folder:\n\n- [discord-active-role-bot](https://github.com/peterthehan/discord-active-role-bot)\n- [discord-audit-log-bot](https://github.com/peterthehan/discord-audit-log-bot)\n- [discord-birthday-role-bot](https://github.com/peterthehan/discord-birthday-role-bot)\n- [discord-cron-bot](https://github.com/peterthehan/discord-cron-bot)\n- [discord-dad-bot](https://github.com/peterthehan/discord-dad-bot)\n- [discord-dynamic-voice-channels-bot](https://github.com/peterthehan/discord-dynamic-voice-channels-bot)\n- [discord-reaction-role-bot](https://github.com/peterthehan/discord-reaction-role-bot)\n- [discord-starboard-bot](https://github.com/peterthehan/discord-starboard-bot)\n- [discord-superactive-role-bot](https://github.com/peterthehan/discord-superactive-role-bot)\n- [discord-twitter-bot](https://github.com/peterthehan/discord-twitter-bot)\n\n## Troubleshooting\n\n- Remove bots in your server that may conflict in functionality, e.g. multiple reaction role bots.\n- Use [Git Bash](https://git-scm.com/downloads) instead of the Command Prompt (cmd.exe) if you are on Windows.\n- Check that your:\n  - `node` version is `\u003e=16.6.0` by running `node -v`.\n  - `npm` version is `\u003e=7.0.0` by running `npm -v`.\n- If running the application outputs:\n  - `Error: Cannot find module '...'`, try running `npm i` in the project directory.\n  - `DiscordAPIError: Missing Permissions`, verify your bot has the correct `Manage` permissions.\n\nVisit for more help or information!\n\n\u003ca href=\"https://discord.gg/WjEFnzC\"\u003e\n  \u003cimg src=\"https://discord.com/api/guilds/258167954913361930/embed.png?style=banner2\" title=\"Discord server invite\" alt=\"Discord server invite\" /\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterthehan%2Fcreate-discord-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterthehan%2Fcreate-discord-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterthehan%2Fcreate-discord-bot/lists"}