The video game community is growing at rapid speed. And there are more and more people joining the industry. However, as a gamer, it is extremely important for us to communicate with our community and stay updated with all the trends. But doing those task as a person can be a hard job. And this is where Discord bot comes into play. So the question is how to make a discord bot?
In case if you have the same question in your mind and wondering how can you make a discord bot. Then I am here to help you out. It is extremely easy to create a discord bot with and without coding. So let’s just head into the topic without wasting much of the time.
What is Discord Bot?
Discord bot is a tool provided by discord which can perform multiple tasks according to your needs. You will need to make the bot by yourself, though. But once, you have the bot with you. You can perform different tasks like looking for messages in a community, chatting with others, and so on.
How to Make a Discord Bot?
Now the question is How to Make a Discord Bot? Well, there are two ways to make a discord bot. You can either use programming languages like Python or Node js to create it. Or you can use a tool called Zapier which will help you to make a discord bot without coding.
How to Make a Discord Music Bot?
To help you to make a discord Music bot, Discord is already offering you an AAPI which you can use for the job. And in this part, I am going to talk about this API only. So here we go:
Setting up a discord bot
- First of all, go to discord development portal and create a new application.
- Then give your bot a new name and hit the create button.
- Then select the bot tab and click on add bot.
- By now our bot will get ready, and now we have to invite it to our server.
Adding the bot to your server
Once you are done creating a bot, you have to invite it using the OAuth2 URL Generator. For this, follow these steps:
- Go to the OAuth2 page and select bot in the scope tap.
- Then you have to select all the needed permissions to play music and read messages.
- Then we can copy our generated URL and paste it into our browser.
- After pasting it, we add it to our server by selecting the server and clicking the authorize button.
Creating our project
Once you are done with the above steps, it is time to create the project. So go to your terminal and follow these steps:
- At first, we have to create a directory and move into it. For this use these commands: mkdir musicbot && cd musicbot
- Now we have to create a project module. Type down npm init command in the terminal and hit the enter button. Then answer all the questions and you are good to go.
- Then type down these commands:touch index.js && touch config.json
- Next, open these files using a code editor like Atom or VS Code.
Next, use this following command to install dependicies on your project:
npm install discord.js ffmpeg-binaries opusscript ytdl-core –save
Complete Index.js Code
In the end, open the index.js file and over here paste these lines of code:
In the end, simply run the project and you are good to go.
How to Make a Discord Bot without Coding?
Just in case if you do not want to get into coding. Then there is an awesome tool available called Zapier. Also, the best part of Zapier is that you can connect Discord with 1500 plus apps which will allow you to build bots that pull information from the web.
However, to walk you through all the steps, let me talk about a basic application. So you can get a clear idea of how Zappier works. To get started with Zapier, go ahead and follow these steps:
For this example, we are going to create a bot that let others know about weather updates. Suppose you have a group where you would like to send a message whether it is going to rain or not. So to get started with this, follow these steps:
- First of all, go and sign up on Zapier.
- Then it will ask you “What Apps Do You Use” simply search weather over here.
- Now select an App event. For example, you can select the “Will It Rain Today” option.
- Next, hit the continue button.
- Now, you will get the Customize Forecast option. Over here, enter details like add Latitude or the location you wish to check. As well as you have to select the longitude.
- Then hit the continue button.
- Now you will have to select an action app. For this, simply select Discord.
- Next, you will have to select send Channel Message, then click Save and Continue button.
- After that, you will be asked to enter your Discord account details to Zapier. You will need to select which server you want to add your bot to.
- Once you are done with that, we will have to set up a template now. You will need to choose the channel where you want your post to go and then you have to customize your message.
- Next, you will have to customize your discord bot. Like you will be able to add the name of the bot, change the icon and make some other changes to your bot.
- By now you will be ready with your bot. Next, simply test your discord bot and check how it is working for you.
In the end, check, if everyone in your Discord channel received the message or not. Overall, creating a bot is pretty easy. By following these steps, you will be able to create other kinds of bots that shares news about the latest games, upcoming events, and so on. Even there are 1500+ other apps that you can explore. The thing is that you will need to be creative enough to create the right apps for your Discord channel.
In addition to that, there are quite a lot of official tutorials are also available from Zapier. You can read them to get more and more idea about how to create effective Discord bots. And be creative with your Discord bots.
So that was all about the discord bots. Discord bots are extremely helpful and can perform a lot of jobs. In the end, it is up to you how you are going to make the Discord bot work for you.
You need to be creative with your ideas to make awesome discord bots. Also, the good part is that there are quite a lot of tutorials that are available out there. So you can make any bot in no time.
So go ahead and try to make a discord bot by yourself and see how it is working for you. Also, for any questions do comment below.