Discord Bot Basics: Making Your Own Bot

In this Discord Bot Basics post, Caelan explains how to make a simple bot in discord.js, featuring a config.json file and app.js file.

How to make your own bot (for starters):

Step 1: Enter Discord Applications (https://discordapp.com/developers/applications/me)

Step 2: Open “My Apps” and click “New App”

Step 3: Type your bots name in “App name” and enter what you want your bots pfp to be in “App Icon”

Step 4: Click “Create App”

Step 5: Click “Create a Bot User”

Step 6: Create a File on your PC

Step 7: Create a Test Discord server

Step 8: Under your bot App, Click “Generate OAuth2 URL” and and add the bot to a test server

Step 9: Download Node.js, Discord.js and Visual Studio (optional). https://code.visualstudio.com/download https://nodejs.org/en/download/ “npm install discord.js” (in command prompt after downloading node.js)

Step 10: Create two files, “app.js” and “config.json”

Step 11: in “config.json” open the window with notepad or Visual Studio and enter “

[code language=”javascript”]

{ “token” : “,<Input the Client Token found in bot app>”, “prefix” : “!” }

[/code]

Step 12: In app.js enter bot scripts for commands with visual studio or notepad, include

[code language=”javascript”]

“client.login(config.token);”

[/code]

at the end

Step 13: Create a file called start.bat and open it Now your bot should be online and functional with the scripts you enetered in app.js Example scripts for commands will be listed in another article

Hey I'm Will, I'm the CEO of Advertise Your Server and I love to help grow online communities.

Leave a Reply

Your email address will not be published.