We created a folder (directory) called “ping-pong-bot”, and then saw it appear once we listed everything in our current directory.All that’s left for us to do now is use the “Change Directory” command to go inside if the ping-pong-bot folder:And there we have it, we’re in the /ping-pong-bot/ directory!Next, we’re going to install node.js on our server.Once you type that command you’ll see it read the package and ask you if you want to install.Once you’re back in the subfolder you created, node.js has been installed:Now we’ll want to do the same thing with NPM, which is “Node Package Manager”Once you’ve installed node.js and npm, time to check the installation.To do that, we can use two commands to check their versions:Now we want to “initialize” our project using the Node Package Manager.This is done through one simple command, and it’ll bring up a “wizard” where you follow along with the steps and type in your responses.Note: Before you type the “npm init” command, make sure you’re still in the right folder! This is the default role that is created by discord and is assigned to everyone who joins your server. We just assumed that your bot is a “black box” with some code, and your goal is to get it up and running on a reliable server.This is all well and good until we get to some more In this section, we’re going to go over the process of hosting a Discord Music Bot, Discord.js Bot, and even bots made with Discord Bot Maker.Hosting a bot made with Discord.js is one of the most common methods on the web today.This involves having Node.js up and running and then installing the Discord.js module via. A new role with name “new role” has now been created. ?addrole [name] [hex color] [hoist]: Discord uses a feature called functions to distinguish groups of consumers from one another. Press question mark to learn the rest of the keyboard shortcuts Type yes to proceed and connect.At the very end, you’ll see that you’re connected to your server! User profile rules. We’ll do this in the next section step by step.From here on out, all that’s left for us to do is to (1) Upload your bot’s files and (2) Launch your Discord bot!Remember how in the last section we ran “npm-init” and used the default “Entry Point” or “main” filename: index.js?You can either modify your node package.json file and change the entry point file name to whatever you’d like, or you can leave it at its default “index.js”.If you look inside of your package.json file (by typing the command: “cat package.json”), you’ll see what your current “main” is set to.Anyways, let’s actually upload our bot’s main file containing all of our code.This is a simple bot that uses the “discord.js” library to write a message as soon as the bot is all started up and loaded saying, “Ping Pong Bot Loaded!”As soon as someone types a message that says “Ping”, our bot will reply, “Pong!” Super simple.To make upload our files as easy as possible, we’re going to connect to our server through an application called “Filezilla”.Once you’ve downloaded FileZilla, open up the client! Make this name something descriptive and easy to remember. One of the most common issues coming between you and your friends' cat pics is your domain name service provider.The domain name service, or DNS provider, is the service your computer uses to translate the text and code delivered by webpages into sweet and tasty internet content goodness. This bot will also be using the Discord.js library to interface with the Discord API.The guide starts by going over some Heroku basics and then introducing the files you need in your project for hosting on Heroku (package.json, Procfile, .gitignore, and index.js).You’ll then install all of the prerequisites you need to get your bot up and running, including Node.js, Git, GitHub, and the Heroku CLI (command-line interface).You’ll then run the “npm init” command (just like we did in our Heroku uses the “Procfile” or “Process File” to determine what processes are started on each of your “Dynos”.
addrole [name] [hex color] [hoist]: Designating roles for the team members is always fun. Congratulations!