{"id":14983258,"url":"https://github.com/Reinforss/discordbot-example-v14","last_synced_at":"2025-10-29T21:30:48.001Z","repository":{"id":246766793,"uuid":"822107416","full_name":"Rihanss/discordbot-example-v14","owner":"Rihanss","description":"A sample Discord bot demonstrating basic features using Node.js and discord.js, including support for slash commands and event handling. Ideal for learning discord bot development.","archived":false,"fork":false,"pushed_at":"2024-08-27T16:05:12.000Z","size":92,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-02T04:51:13.293Z","etag":null,"topics":["basic-discordjs","bot","discord","discord-bot","discord-js","discord-slash-commands","discordbot","discordjs","node-js","nodejs"],"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/Rihanss.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}},"created_at":"2024-06-30T10:22:12.000Z","updated_at":"2024-08-27T16:05:15.000Z","dependencies_parsed_at":"2024-08-27T17:15:24.907Z","dependency_job_id":null,"html_url":"https://github.com/Rihanss/discordbot-example-v14","commit_stats":null,"previous_names":["rihanss/discordbot-example-v14"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rihanss%2Fdiscordbot-example-v14","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rihanss%2Fdiscordbot-example-v14/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rihanss%2Fdiscordbot-example-v14/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rihanss%2Fdiscordbot-example-v14/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rihanss","download_url":"https://codeload.github.com/Rihanss/discordbot-example-v14/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238892381,"owners_count":19548178,"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":["basic-discordjs","bot","discord","discord-bot","discord-js","discord-slash-commands","discordbot","discordjs","node-js","nodejs"],"created_at":"2024-09-24T14:06:58.338Z","updated_at":"2025-10-29T21:30:42.629Z","avatar_url":"https://github.com/Rihanss.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Discord Bot Example\n\nDiscord bot example made in Discord.js (Javascript). Follow the instructions below to set up and run the discord bot.\n\n## Features 📈\n\n- Easy to Setup\n- Made for Slash Commands\n- Up to date\n\n## Prerequisites\n\nBefore you begin, ensure you have met the following requirements:\n\n- You have a [Discord](https://discord.com/) account.\n- You have latest [Node.js](https://nodejs.org/) installed.\n- You have [npm](https://www.npmjs.com/) installed.\n- You have [git](https://git-scm.com) installed.\n\n## Step 1: Setting Up the Bot\n\n1. Go to the [Discord Developer Portal](https://discord.com/developers/applications).\n2. Click on \"New Application\" and give it a name.\n\n![bot create](https://imgur.com/JP2IJRj.png \"Step 2\")\n\n3. You can choose between Personal or Team\n4. Agree to Discord Developer Terms of Service and Developer Policy\n5. You have created your Discord Bot.\n\n### Step 2: Get the Bot Token \u0026 ID\n\n1. In the \"General Information\" tab, click \"Copy\" under \"Application ID\". Save this ID as it will be used in your code.\n\n![bot id](https://imgur.com/D9eeRHZ.png \"Step 1\")\n\n2. In the \"Bot\" tab, click \"Copy\" under \"TOKEN\". Save this token as it will be used in your code.\n\u003e Due to a recent update from Discord, you need to reset your bot token to be able to copy it.\n\n![bot token](https://imgur.com/Bnw52eq.png \"Step 2\")\n\n\u003e Do not share your Discord Bot Token. Tokens shown in the example are no longer valid.\n\n### Step 3: Invite the Bot to Your Server\n\n1. Go to the \"OAuth2\" tab.\n2. Under \"OAuth2 URL Generator\", select \"bot\" and \"application.commands\".\n3. Under \"Bot Permissions\", select the permissions your bot will need.\n4. Copy the generated URL and open it in your browser.\n5. Select the server you want to add the bot to and authorize it.\n\n### Step 4: Clone the Repository\n\n```bash\ngit clone https://github.com/Rihanss/discordbot-example-v14.git\n```\n\n### Step 5: Install Dependencies\n\n```bash\nnpm install\n```\n\n### Step 6: Configure the Bot\n\n1. Rename `example.env` to `.env`\n2. Fill the required values from with what have you saved from step 2.\n\n```bash\nTOKEN=YOURBOTTOKEN\nCLIENTID=BOTID\n```\n\n### Step 7: Start the bot\n\n```bash\nnode deploy\n```\n\n\u003e This also creates commands needed for your Discord bot to respond.\n\n# Troubleshooting\n\n### Error: Used disallowed intents\nThe error `Error: Used disallowed intents` occurs when your Discord bot is trying to use Gateway Intents that haven't been enabled or aren't allowed for your bot. Discord introduced Gateway Intents to give developers more control over what events their bot receives. However, some intents are considered \"privileged\" and require you to enable them explicitly in your bot's settings on the Discord Developer Portal.\n\n```shell\n          error: new Error(\"Used disallowed intents\")\n                 ^\n\nError: Used disallowed intents\n```\n\nSteps to Fix the Error\n\n- Go to the [Discord Developer Portal](https://discord.com/developers/applications).\n- Select your bot application.\n- Navigate to the \"Bot\" tab on the left.\n- Scroll down to the \"Privileged Gateway Intents\" section.\n- Enable the all intents.\n\n# Guides 📚\n\n- [Creating slash commands](https://discordjs.guide/creating-your-bot/slash-commands.html)\n- [Command response methods](https://discordjs.guide/slash-commands/response-methods.html)\n- [Handling Commands](https://discordjs.guide/creating-your-bot/command-handling.html#command-handling)\n\n## Support ⚙️\n\nIf you have found an issue with using this Discord bot example, feel free to submit an [issue here](https://github.com/Rihanss/discordbot-example-v14/issues) or a [pull request](https://github.com/Rihanss/discordbot-example-v14/pulls). I'll be happy to take a look\n\n## Thanks! ❤️\nThis repo is maintained in my spare time. If you like the example I've provided, please give it a star :)\n\n## License\n\nThis project is licensed under the MIT License. \n\nThe MIT License is a permissive license that allows for reuse, modification, and distribution of the software. You are free to use this software in any project, personal or commercial, as long as you include the original license and copyright notice in any distributed copies or substantial portions of the software.\n\nFor more details, see the [LICENSE](LICENSE) file.\n\n## Check out my discord bot!\n[![Discord Bots](https://top.gg/api/widget/519521318719324181.svg)](https://top.gg/bot/519521318719324181)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FReinforss%2Fdiscordbot-example-v14","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FReinforss%2Fdiscordbot-example-v14","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FReinforss%2Fdiscordbot-example-v14/lists"}