Giter VIP home page Giter VIP logo

discord-music-bot's Introduction

discord-music-bot

Docker pulls

This is a minimal music bot for Discord that support streaming to multiple servers concurrently.

It uses youtube-dl to search and download the video as well as ffmpeg to convert and stream the audio.

Usage

Environment variable Description Required Default
DISCORD_BOT_TOKEN Discord bot token yes ""
COMMAND_PREFIX Character prepending all bot commands. Must be exactly 1 character, or it will default to ! no !
MAXIMUM_AUDIO_DURATION_IN_SECONDS Maximum duration of audio clips in second no 480
MAXIMUM_QUEUE_SIZE Maximum number of medias that can be queued up per server/guild no 10
BOT_ADMINS Comma-separated list of user ids no ""

Getting started

Discord

  1. Create an application
  2. Add a bot in your application
  3. Save the bot's token and set it as the DISCORD_BOT_TOKEN environment variable
  4. Go to https://discordapp.com/oauth2/authorize?client_id=<YOUR_BOT_CLIENT_ID>&scope=bot&permissions=3222592
  5. Add music bot to server

Bot commands

Assuming COMMAND_PREFIX is not defined or is set to !.

Command Description Example
!youtube, !yt, !play Add a song to the queue !yt what is love
!skip Skip the current song
!stop Skip all songs in the queue
!help Display all commands
!health Provides information about the health of the bot
!info Provides general information about the bot
!restart Restarts the bot. Must be admin.

Prerequisites

If you want to run it locally, you'll need the following applications:

  • youtube-dl
  • ffmpeg

Docker

Pulling from Docker Hub

docker pull twinproduction/discord-music-bot

Building image locally

Building the Docker image is done as following:

docker build . -t twinproduction/discord-music-bot

You can then run the container with the following command:

docker run -e DISCORD_BOT_TOKEN=secret --name discord-music-bot twinproduction/discord-music-bot

FAQ

How do I add my bot to a new server?

See step 4 of the Discord section.

discord-music-bot's People

Contributors

twin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.