├── .env.example ├── .eslintrc.js ├── .github └── workflows │ └── deploy-image.yml ├── .gitignore ├── .replit ├── .vscode └── settings.json ├── Dockerfile ├── README.md ├── commands ├── back.js ├── bassboost.js ├── clear.js ├── history.js ├── jump.js ├── loop.js ├── np.js ├── pause.js ├── play.js ├── playnext.js ├── queue.js ├── remove.js ├── resume.js ├── seek.js ├── shuffle.js ├── skip.js ├── stop.js └── volume.js ├── docs.js ├── events.js ├── index.js ├── package.json ├── replit.nix └── yarn.lock /.env.example: -------------------------------------------------------------------------------- 1 | DISCORD_CLIENT_ID="" 2 | DISCORD_CLIENT_TOKEN="" 3 | DISCORD_CLIENT_PUBKEY="" 4 | 5 | DISCORD_GUILD_ID="" 6 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | commonjs: true, 4 | es2021: true, 5 | node: true 6 | }, 7 | extends: 'eslint:recommended', 8 | parserOptions: { 9 | ecmaVersion: 12 10 | }, 11 | rules: { 12 | indent: [ 13 | 'error', 14 | 4 15 | ], 16 | 'linebreak-style': [ 17 | 'error', 18 | 'unix' 19 | ], 20 | quotes: [ 21 | 'error', 22 | 'single' 23 | ], 24 | semi: [ 25 | 'error', 26 | 'always' 27 | ], 28 | 'quote-props': [ 29 | 'error', 30 | 'as-needed' 31 | ] 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /.github/workflows/deploy-image.yml: -------------------------------------------------------------------------------- 1 | 2 | name: Create and publish a Docker image 3 | 4 | on: 5 | push: 6 | branches: ['master'] 7 | release: 8 | types: 9 | - created 10 | 11 | env: 12 | REGISTRY: ghcr.io 13 | IMAGE_NAME: ${{ github.repository }} 14 | 15 | jobs: 16 | build-and-push-image: 17 | runs-on: ubuntu-latest 18 | permissions: 19 | contents: read 20 | packages: write 21 | 22 | steps: 23 | - name: Checkout repository 24 | uses: actions/checkout@v2 25 | 26 | - name: Log in to the Container registry 27 | uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 28 | with: 29 | registry: ${{ env.REGISTRY }} 30 | username: ${{ github.actor }} 31 | password: ${{ secrets.GITHUB_TOKEN }} 32 | 33 | - name: Extract metadata (tags, labels) for Docker 34 | id: meta 35 | uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 36 | with: 37 | images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} 38 | 39 | - name: Build and push Docker image 40 | uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc 41 | with: 42 | context: . 43 | push: true 44 | tags: ${{ steps.meta.outputs.tags }} 45 | labels: ${{ steps.meta.outputs.labels }} 46 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Node 2 | node_modules 3 | .env 4 | package-lock.json 5 | 6 | # tests 7 | test 8 | -------------------------------------------------------------------------------- /.replit: -------------------------------------------------------------------------------- 1 | language = "nix" 2 | run = "node ." -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.codeActionsOnSave": { 3 | "source.fixAll.eslint": true 4 | }, 5 | "eslint.validate": ["javascript"] 6 | } 7 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:alpine 2 | WORKDIR discord-music-bot 3 | RUN apk add ffmpeg 4 | 5 | COPY . . 6 | RUN npm install 7 | 8 | CMD yarn start 9 | 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Discord Music Bot 2 | 3 | The perfect music bot for your Discord server! 🎶 4 | 5 | ## Features 6 | 7 | ### Highlights 8 | 9 | * Simple & easy to use 🤘 10 | * Audio filters (bassboost) 🎸 11 | * YouTube, Facebook and Vimeo support 🌌 12 | * Slash Commands support 🤖 13 | * Play in multiple servers at the same time 🚗 14 | 15 | ### Commands 16 | 17 | Here are all the available commands in the bot! 18 | 19 | | Name | Description | Options | 20 | |:---------------|:----------------------------------:|----------:| 21 | | **/back** | Play the previous track | | 22 | | **/bassboost** | Toggle bassboost filter | | 23 | | **/clear** | Clear the current queue. | | 24 | | **/history** | Display the queue history | \ | 25 | | **/jump** | Jump to a specific track | \ | 26 | | **/loop** | Set loop mode | \ | 27 | | **/np** | See what's currently being played | | 28 | | **/pause** | Pause the current song | | 29 | | **/play** | Play a song from youtube | \ | 30 | | **/playnext** | Add a song to the top of the queue | \ | 31 | | **/queue** | See the queue | \ | 32 | | **/remove** | Remove a specific track | \ | 33 | | **/resume** | Resume the current song | | 34 | | **/seek** | Seek to the given time | \