eumermondio / simple-discord-bot-template-nodejs

A simple and easy discord bot template ready to use!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Discord Bot Template

A simple and easy discord bot template ready to use!

Made with ❤ by eumermondio

Table of contents

Requirements

Git

Download git here

NodeJS

Download nodejs here

Visual Studio Code

Download visual studio code here

Getting started


Fork this repo

First of all you must fork this repo. Later you will need it to upload your own bot to github. Fork it by clicking on fork button


Create a folder

Once forked this repo go to your desktop and create a folder. Name doesn't matter by the way


Open that folder with Visual Studio Code

Then you'll need to open that folder with visual studio code. Open visual studio code and do this shortcut CTRL + K + O. Once you have done this look for your folder and select it.


Initialize git on that folder

Ok you have completed the 50 of this guide so... Congrats! Go on!

To initialize git on your folder you must go to the left toolbar of visual studio code and click the source control button. It looks like a Y. Once done this click the initialize button and wait. If you see a commit button you are going ok.


Clone the forked repo

Now click the source control button again and click the ... button. It appears on top. Now click on clone and paste the URL of the forked repo. It's on your github profile. Once done this you should look the repo files.


Setting up npm

Open a terminal on visual studio code by clicking on terminal button and run these commands.

npm init
npm install discord.js

You should see new files like package.json.


Create a discord application

Ok, you've set up the files. Now you need a discord app active to complete your bot.

Create your discord app here

Once you done it create a bot and reset his token. Copy the token.


Bot token

Now you have the bot's token in your clipboard. Go to visual studio code and open this folder index.js. Go to bottom and you'll see something like this

// LogIn
client.login("BOT'S TOKEN HERE");

Paste your token there


Run your bot

Congratulations dude! This is the final step so keep calm. Now open a terminal and run this command.

node .

You should see this in console.

Bot Online
Logged as: BOT'S NAME

If you see that your bot is now running!!!


License

MIT