Giter VIP home page Giter VIP logo

music-discord-heroku-bot's Introduction

The discord API provides you with an easy tool to create and use your own bots and tools. For this tutorial we are going to create a basic music bot and add it to our server, not only for developers any one can do it. The bot will have the following command :

  • PLAY command.
  • HELP command.
  • QUEUE command.
  • NOWPLAYING command.
  • LOOP command.
  • SKIP command.
  • PAUSE command.
  • RESUME command.
  • CLEARQUEUE command.
  • LEAVE command.
  • SEARCH command.
  • VOLUME command.
  • REMOVE command.

Requirements

Heroku account

Google account

Setting up a discord bot

First, we need to create a new application on the discord development portal. We can do so by visiting the portal and clicking on new application.

Make your own music Discord bot for FREE

Chose the right name for the application

Make your own music Discord bot for FREE

After that, we need to select the bot tab and click on add bot and copy the token and store it we will need it later.

Make your own music Discord bot for FREE Make your own music Discord bot for FREE

Now that both application and bot are created we have to associate the bot to our server

Make your own music Discord bot for FREE Make your own music Discord bot for FREE

Get a youtube API token

Go to https://developers.google.com/ and log in or create an account, if necessary. After logging in go to this link https://console.developers.google.com/project and click on the blue CREATE PROJECT button as depicted in the photo below. Wait a moment as google prepares your project.

Fill in whatever Project Name you want.

Then click GoogleAPIs link in the top left corner and then click the link option called “YouTube Data API.” It’s under YouTube API’s. You can see it highlighted in the photo below, bottom right.

Now click on the “ENABLE” button.

Next click on the blue ‘Go to Credentials’ button to the right.

Choose the select option YouTube Data API v3 for the first select option and Web server(e.g. node js. Tomcat) for the second selection. Then choose Public data. Now click the blue button, “What credentials do I need?.”

Almost done, wait for google to create your new project and you should see the screen below where you can copy your API Key.

Store the copied API youtube key we will need it in the last step of the tutorial.

Deploy our bot

If you are not a developer all you have to is to copy my pre-coded project and you are good to go, for more details if you want to add more functionalities ask me in comment and i will do a developer version of this tutorial. click this button. Add the copied tokens and prefix.

Deploy

Make your own music Discord bot for FREE

And then click manage app for the next section.

Configure your bot

Under resources tab disable Web and activate Worker.

Make your own music Discord bot for FREE

Finally click on more and restart all dynos

Make your own music Discord bot for FREE

Now you cant test your bot with any command

play justin bieber baby

if you liked the tutorial you can support me by :

Buy Me A Coffee

music-discord-heroku-bot's People

Contributors

dependabot[bot] avatar imgbotapp avatar mrsmook avatar

Stargazers

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

Watchers

 avatar  avatar

music-discord-heroku-bot's Issues

Build failed

@discordjs/[email protected] install /tmp/build_d2b2433f_/node_modules/@discordjs/opus
> node-pre-gyp install --fallback-to-build

   sh: 1: node-pre-gyp: Permission denied
   npm ERR! code ELIFECYCLE
   npm ERR! errno 126
   npm ERR! @discordjs/[email protected] install: `node-pre-gyp install --fallback-to-build`
   npm ERR! Exit status 126
   npm ERR! 
   npm ERR! Failed at the @discordjs/[email protected] install script.
   npm ERR! This is probably not a problem 

No sound

When we play a song, the bot joins the vc, but it wont play any song.

song not playing

I have tried many time. when I try to play any song it show 'Could not extract html5player' in console

No sound

The bot has joined the voice channel, and its header show it was speaking. Instead, it was not play anything. The queue showed it was playing something, but nobody could hear it.

search is not working correctly

Why, when searching for a song by title, the search works very poorly. For example when searching for a song "Consul Trainin - Obsession", he gives me a very distant result, also when entering other songs, and sometimes it outputs something completely different, which does not concern my requirements. Please fix it...

Build App failed

The deploying on Heroku doesn't work.
There stands. "There was an issue building your app. This can mean your app.json's project is not a valid Heroku application. Please ensure your app is deployable to Heroku and try again."
I tried it 3 times angain but nothing changed.
Picture
Pls help me and i hope i hear soon of 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.