/discordjs-template

A Discordjs template

Primary LanguageJavaScriptMIT LicenseMIT

discordjs-template

A template for your own bot using discord.js

Index

  1. About
  2. Setup
    1. Prerequisites
    2. Installation
    3. Configuration
    4. Running
  3. License

About

This project is made for people that are either starting on discord.js or that are way too lazy to start a bot from scratch (like me).
It includes the just the basics for it to start.
Note that this was made using the now old discord.js library.

Setup

Prerequisites

Installation

  1. Clone this repository downloading the .zip or via git:
git clone https://github.com/Omi036/discordjs-template/
  1. Cd into the folder and setup the dependencies:
cd discordjs-template
npm run setup

All the packages and a file named config.json should be now created.

Configuration

Before running the script, make sure to fill up the config.json file.
You can access your bot token on your bot section inside the discord developer dashboard, and the client id should be on a label named Application ID inside General Information.
It should end up looking like this:

{
    "token":"YOUR_TOKEN_HERE",
    "clientId":"YOUR_CLIENT_ID"
}

Running

Finally, to run the bot, run npm run start and your bot should be now alive.

License

Distributed under the MIT License. See LICENSE for more information.

back to top