Giter VIP home page Giter VIP logo

divyakumarbaid / discord_music_bot Goto Github PK

View Code? Open in Web Editor NEW
16.0 1.0 7.0 65 KB

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: MIT License

Shell 0.60% Python 99.40%
bot discord-bot discord discord-py discord-music-bot music music-bot beginner beginner-friendly beginner-code

discord_music_bot's Introduction

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

discord_music_bot's People

Contributors

afraz0khan avatar ayushtaparia avatar divyakumarbaid avatar im-vivekthakur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

discord_music_bot's Issues

Add shuffle option

Hey, it's a nice project. I would like to add a small change to it. I would like to add a shuffle option that lets the bot to play available songs randomly. Or I could even try to play songs randomly on youtube, that are not on the list.
Please say if you are interested and also which feature would you like to add.
If interested, please add hackoberfest label to it and assign it to me.
Thank you.

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.