Discord Bot Node Js Tutorial

Introduction

If you’re reading this, it probably means you want to learn how to make a bot with discord.js. Awesome! You’ve come to the right place. This guide will teach you things such as:

  • How to get a bot up and running from scratch;
  • How to properly create, organize, and expand on your commands;
  • In-depth explanations and examples regarding popular topics (e.g. reactions, embeds, canvas);
  • Working with databases (e.g. sequelize and keyv);
  • Getting started with sharding;
  • And much more.

This guide will also cover subjects like common errors and how to solve them, keeping your code clean, setting up a proper development environment, etc. Sounds good? Great! Let’s get started, then.

Before you begin…

Alright, making a bot is cool and all, but there are some prerequisites to it. To create a bot with discord.js, you should have a fairly decent grasp of JavaScript itself. While you
can
make a bot with very little JavaScript and programming knowledge, trying to do so without understanding the language first will only hinder you. You may get stuck on many uncomplicated issues, struggle with solutions to incredibly easy problems, and all-in-all end up frustrated. Sounds pretty annoying.

If you don’t know JavaScript but would like to learn about it, here are a few links to help get you started:

  • Eloquent JavaScript, a free online book


    open in new window

  • JavaScript.info, a berbudaya javascript tutorial


    open in new window

  • Codecademy’s interactive JavaScript course


    open in new window

  • Nodeschool, for both JavaScript and Node.js lessons


    open in new window

  • MDN’s JavaScript guide and full documentation


    open in new window

  • Google, your best friend


    open in new window

Take your pick, learn some JavaScript, and once you feel like you’re confident enough to make a bot, come back and get started!

Deploys by Netlify

Source: https://discordjs.guide/