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 :
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.
Chose the right name for the application
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.
Now that both application and bot are created we have to associate the bot to our server
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.
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.
And then click manage app for the next section.
Under resources tab disable Web and activate Worker.
Finally click on more and restart all dynos
Now you cant test your bot with any command
play justin bieber baby
if you liked the tutorial you can support me by :