DEV Community

Cover image for Building a Discord Bot (Basic Setups)
Vishnu Dileesh
Vishnu Dileesh

Posted on

Building a Discord Bot (Basic Setups)

Discord bots are a great way to add engagement to the servers. They are also fun to build and share with friends.

I always love to keep the official docs open for quick reference
https://discordjs.guide/
This tutorial from Digital Ocean was very handy while I got started
Digital Ocean Nodejs Discord Bot - tutorial

Before jumping into coding, we first need to set up a discord bot using the discord's application dashboard

Create an App by clicking the button - New Application

Alt Text

Now click on the button - Bot

Alt Text

On bot page - click on the button - Add Bot

Alt Text

Now we are on the newly added Bot page, here we can see information on our bot, including secrets like Token, which has to be kept a secret. They are never meant to be shared with anyone.

Alt Text

Now let's invite the bot to our server, click on the button - OAuth2. On the 0Auth2 page choose scope as bot and bot permissions as Administrator

Alt Text

Copy the link and paste it on a new tab in your browser, and select the server in which you want to add your newly born baby bot

Alt Text

Then approve the needed permissions for the bot to function on your server of choice and click Authorize

Alt Text

Ones Authorized, your bot is all set to bring joy to your Discord Server.

Alt Text

For the bot to be functional we need to do some actual coding
In future posts, We will do a walkthrough of building Discord bots

If you got any Discord Bot ideas, comment below

Top comments (0)