{"id":14983172,"url":"https://github.com/tannergabriel/discord-bot","last_synced_at":"2025-10-07T19:33:41.707Z","repository":{"id":37396645,"uuid":"175271936","full_name":"TannerGabriel/discord-bot","owner":"TannerGabriel","description":"Simple discord bot to play music and manage your server","archived":false,"fork":false,"pushed_at":"2025-05-07T13:13:24.000Z","size":539,"stargazers_count":615,"open_issues_count":4,"forks_count":403,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-05-14T23:07:16.217Z","etag":null,"topics":["discord","discord-bot","discord-js","javascript","music-bot"],"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/TannerGabriel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["TannerGabriel"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-03-12T18:17:57.000Z","updated_at":"2025-05-12T22:34:50.000Z","dependencies_parsed_at":"2023-02-14T13:00:46.432Z","dependency_job_id":"a8caf3eb-d9e4-4ad8-9216-053f3b689743","html_url":"https://github.com/TannerGabriel/discord-bot","commit_stats":{"total_commits":133,"total_committers":16,"mean_commits":8.3125,"dds":0.368421052631579,"last_synced_commit":"1b30cb867f4b3aa4ed2000cfcc7b84ca33bc42b0"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TannerGabriel%2Fdiscord-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TannerGabriel%2Fdiscord-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TannerGabriel%2Fdiscord-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TannerGabriel%2Fdiscord-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TannerGabriel","download_url":"https://codeload.github.com/TannerGabriel/discord-bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254243362,"owners_count":22038046,"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","music-bot"],"created_at":"2024-09-24T14:06:50.784Z","updated_at":"2025-10-07T19:33:36.686Z","avatar_url":"https://github.com/TannerGabriel.png","language":"JavaScript","funding_links":["https://github.com/sponsors/TannerGabriel","https://www.buymeacoffee.com/gabrieltanner"],"categories":[],"sub_categories":[],"readme":"# Discord Music bot\n\nA simple discord bot that helps you manage your server by providing useful commands like playing music or deleting text messages.\n\nYou can find the tutorial about building a discord music bot [here](https://gabrieltanner.org/blog/dicord-music-bot).\n\n## Table of content\n\n* [Requirements](#requirements)\n* [Getting started](#getting-started)\n* [Docker](#docker)\n* [Features \u0026 Commands](#features--commands)\n* [Common errors](#common-errors)\n* [Contributing](#contributing)\n* [Author](#author)\n* [License](#license)\n\n## Requirements\n\n- [Node](https://nodejs.org/en/) - Version 16 or higher\n- [NPM](https://www.npmjs.com/)\n- [FFMPEG](https://www.ffmpeg.org/)\n- [Docker](https://www.docker.com/) (optional)\n\n## Getting started\n\nFirst, make sure you have all the required tools installed on your local machine then continue with these steps.\n\n### Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/TannerGabriel/discord-bot.git\n\n# Enter into the directory\ncd discord-bot/\n\n# Install the dependencies\nnpm install\n\n# Configure Discord Bot Token\n echo \"DISCORD_TOKEN='INSERT_YOUR_TOKEN_HERE'\" \u003e .env\n```\n\n### Other environment variables\n\nCurrently we also need to set the `DP_FORCE_YTDL_MOD` environment variable to override `ytdl-core` for the `discord-player`.\n\n```\nDISCORD_TOKEN=INSERT_YOUR_TOKEN_HERE\nDP_FORCE_YTDL_MOD=\"@distube/ytdl-core\"\n```\n\n### Required permissions\n\nMake sure that your bot has the `applications.commands` application scope enabled, which can be found under the `OAuth2` tab on the [developer portal](https://discord.com/developers/applications/)\n\nEnable the `Server Members Intent` and `Message Content Intent` which can be found under the `Bot` tab on the [developer portal](https://discord.com/developers/applications/)\n\n### Configuration\n\nAfter cloning the project and installing all dependencies, you need to add your Discord API token in the `.env` file.\n\n### Changing the status\n\nYou can change the status of your discord bot by editing the `activity` and `activityType` variables inside the `config.json` file. `activityType` needs to be set to an integer with the following [options](https://discord-api-types.dev/api/discord-api-types-v10/enum/ActivityType).\n\n\n### Starting the application\n\n```bash\nnode index.js\n```\n\n### Starting the application using Docker\n\n```bash\n# Build the image\ndocker build --tag discordbot .\n\n# Run the image\ndocker run -d discordbot\n```\n\n### Deploying commands\n\nBefore you can use the bots slash command you first need to add them to your Discord server. You can use the `!deploy` command to do so.\n\n\u003cimg src=\"./assets/deploy-commands.png\"\u003e\n\nAfter deploying the commands you should be able to see and access them by typing a slash:\n\n\u003cimg src=\"./assets/commands.png\"\u003e\n\n## Docker\n\nA mutliarch docker image for `amd64` and `arm64` based on the main branch is available from Github Container Registry:\n\n```bash\ndocker pull ghcr.io/TannerGabriel/discord-bot:latest\n```\n\nA Github Action automatically builds and push `amd64` and `arm64` to ghcr.io, all builds are based on the main branch.\n\nOnly `:latest` tag is supported, otherwise use SHA256 from https://github.com/TannerGabriel/discord-bot/pkgs/container/discord-bot for pinning to a specific commit.\n\n## Features \u0026 Commands\n\n\u003e Note: The repository now uses the new Discord slash commands\n\n* [Play](#play)\n* [Pause](#pause)\n* [Resume](#resume)\n* [Now Playing](#now-playing)\n* [Queue](#queue)\n* [Shuffle](#shuffle)\n* [Loop](#loop)\n* [Skip](#skip)\n* [Remove](#remove)\n* [Move](#move)\n* [Swap](#swap)\n* [Stop](#stop)\n* [Volume](#volume)\n* [Help](#help)\n* [Userinfo](#userinfo)\n* [Ban](#ban)\n* [Purge](#purge)\n\n### Play\n\n▶️ Play music from YouTube via url or search by song name, added to the bottom of the queue.\n\n`/play YOUTUBE_URL`  \n`/play SONG_NAME`\n\n▶️ Play music via url or using song name, this places it next at the top of the queue (position 1).\n\n`/playtop YOUTUBE_URL`  \n`/playtop SONG_NAME`\n\n\u003cimg src=\"./assets/playing_song.png\"\u003e\n\n### Pause\n\n⏸️ Pause music\n\n`/pause`\n\n### Resume\n\n▶️ Resume playing paused music\n\n`/resume`\n\n### Now Playing\n\n🎶 Display current playing song\n\n`/nowplaying`\n\n### Queue\n\n🗒️ Display the current queue\n\n`/queue`\n\n### Shuffle\n\n🔀 Shuffle the current queue\n\n`/shuffle`\n\n### Loop\n\n🔁 Loop/Repeat controls. Off, Track and Queue\n\n`/loop MODE`\n\n### Skip\n\n⏭️ Skip the current playing song and play the next in queue\n\n`/skip`\n\n### Remove\n\n⏏ Remove song from the queue\n\n`/remove POSITION`\n\n### Move\n\n↕ Move song position. This shifts all other songs up or down one, depending on direction you move the target song.\n\n`/move TRACK_POSITION TARGET_POSITION`\n\n### Swap\n\n↔️ Swap two songs current positions with each other\n\n`/swap POSITION_1 POSITION_2`\n\n### Stop\n\n🔇 Stop playing (disconnects bot from voice channel)\n\n`/stop`\n\n### Volume\n\n🔊 Adjust the music bot volume between 0-200\n\n`/volume NUMBER`\n\n### Help\n\n❓ Display commands\n\n`/help`\n\n### Userinfo\n\n* Get information about a user (/userinfo USER)\n\n### Ban\n\n* Ban a player (/ban USER)\n\n### Purge\n\n* Delete the latest chat messages (/purge NUM_OF_MESSAGES)\n\n## Common errors\n\nHere is a list of common errors and how you can fix them.\n\n### Dependencies aren't up to date\n\nThe packages used in this repository get updated often, especially the ytdl-core package. That is why it is always worth a try updating those if you get an error like `invalid URL: undefined` or when the bot crashes when running the play command.\n\n```bash\nnpm install ytdl-core@latest\n```\n\n### FFMPEG is not installed on the machine running the bot\n\nThe `play` command requires FFMPEG to be installed on the machine that is running the bot. You can download it on the official [FFMPEG website](https://www.ffmpeg.org/). Note: This isn't relevant if you use the Dockerfile because it will install FFMPEG inside of the container.\n\n## Contributing\n\nYou are welcome to contribute by submitting a Pull Request to the repository.\n\n## Author\n\n[Gabriel Tanner](https://gabrieltanner.org/)\n\n## Support me\n\n\u003ca href=\"https://www.buymeacoffee.com/gabrieltanner\" target=\"_blank\"\u003e\u003cimg src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy Me A Coffee\" style=\"height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;\" \u003e\u003c/a\u003e\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftannergabriel%2Fdiscord-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftannergabriel%2Fdiscord-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftannergabriel%2Fdiscord-bot/lists"}