Skip to content

This Is a discord bot made from the latest discord.py module as of March 2021. It will play songs from the directory and even will download from given youtube url and play it for 24/7 and would loop through the songs available in the file of your main.py

License

DivyaKumarBaid/Discord_Music_bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord_Music_bot

This is a simple Discord Music bot that plays music 24/7 looping thorugh the available ones in directory. To run this bot we need to several packages such as PyNaCl, discord.py

Installation

Use the package manager pip
To install discord.py

python3 -m pip install -U discord.py

To install PyNaCl

pip install pynacl

To install youtube_dl

pip install youtube_dl

You also need to install FFmpeg API key for song lyrics should be acquired from Genius

Pre-Text:

This is a discord bot made using the lastest discord.py api as of march 2021. This bot plays mp3 file from the storage i.e. all the mp3 files available to play from the file of your bot. I did this program in python language and have used discord.py , youtube_dl , PyNaCl , FFmpeg and several other packages and api's. Initially this bot was build on repl.it IDE and can run for infinite time i.e. it will be online continuously using Uptimerobot

How to Install

  1. Create a python virtual environment.I did in repl.it

  2. Clone the repo git clone https://github.com/DivyaKumarBaid/Discord_Music_bot.git or download the repository.

  3. Go to the cloned/downloaded directory cd Discord_Music_bot

  4. Upload it in repl.it

  5. Create a bot in discord developers portal

  6. Copy the Token of the bot and paste it in the .env file as TOKEN

  7. Run the bot on repl.it

  8. Copy the url that appears on the right side of window

  9. Go to Uptimerobot and create a monitor and paste the copied url and start the monitor.This will keep the bot alive even after you close it.

    For more precise steps have a look at FreeCodeCamp

Commands

  add              This adds a music to the playlist. The url must be of youtube
  clear            This command clears given number of messages and by default it clears last 5 messages
  clear_playlist   This command removes every available mp3 file
  join             This adds bot to the given channel and by default in General
  play             This command plays song from the available ones.Providing channel would let the bot run there else by default it will run in General
  remove           This command removes the specified .mp3 file
  songs            This command lists all the songs available to play
  stop             This stops the music playing and the bot leaves the voice channel
  lyrics           This displays the lyrics for the current playing song

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

About

This Is a discord bot made from the latest discord.py module as of March 2021. It will play songs from the directory and even will download from given youtube url and play it for 24/7 and would loop through the songs available in the file of your main.py

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •