Skip to content
Thomate edited this page Oct 10, 2018 · 3 revisions

Installation

Requirements

In order to use the bot, you will need to install NodeJs v8 or higher http://nodejs.org/

You will also need a database management system (DBMS) in the list below (currently supported)

  • MySql

If you are not familiar with the database management, I recommend using a database browser (select one accordingly to your DBMS).

Because you will need to edit some configurations file, you will also need a text editor like Notepad++, SublimeText or Visual Studio Code. Choose the one you fancy more.

And the last but not the least, you will need a terminal to start your bot and download packages (search how to open a terminal on your operating system if you do not already know).

When you have everything you need installed, you may continue.

The code

You may now download, or clone, the git repository in the folder you want your bot to be.

Download

Just download the .zip file and extract it in the folder.

Clone

If you wish to clone the repository, you will need to have git install. To check if git is install or not, just type git on a terminal. You will receive a message that tells you if git is known by your machine or not. If git is not installed, you can follow the instructions on https://git-scm.com/downloads

Now that git is installed, open a terminal and go to the folder (if you do not know how, search how to use the cd command on your operating system), then run the command git clone https://github.com/Super-Thomate/HousePointsDiscordBot.git.

Configurations

Now that the code is in your folder, run the command npm install in your terminal (be sure to be in the same folder as the files package.json and package-lock.json). This will install the packages the bot needs to be able to run.

Create a file name .env and copy/paste the content of .env.dist in it. In the file .env you will set some parameters :

  • BOT_TOKEN : you do not have one yet, so let it.
  • PREFIX : by default we will using / as a prefix, but you can set it to whatever you want (keep in mind that you will be using it to run any commands of the bot, keep it simple).
  • DB_URL : this url contains the parameters needed by your bot to connect to the database and read/write information, refer to the documentation of your DBMS to set it accordingly.

db_name is the name of the database you want to use, set it to whatever you want :)

  • BOT_NAME : the name your bot will refer itself as.
Clone this wiki locally