Skip to content

Installing the bot on your Discord server

Chokyotager edited this page Jun 8, 2019 · 7 revisions

Installing the bot on your Discord server

The LCN bot is not designed to run on multiple servers per bot due to game concerns. As a result, if you wish to run your own games, you have to host the bot yourself. There are guides online on how to do this for free using Glitch if you wish.

However, this guide will be focusing on how to install the bot on a dedicated server which does not already have NodeJS pre-installed.

Getting NodeJS

Download and install NodeJS and the Node Package Manager (NPM) on your server. The minimum version to use should be 10.15.0. Newer versions should work fine, but older versions may cause the bot to fail.

Clone this repository

Make a local copy of the bot's code onto your machine.

Important: installing dependent packages

This bot has four dependencies:

  1. Discord.js - https://discord.js.org/#/
  2. request
  3. request-promise - https://github.com/request/request-promise
  4. semver - https://www.npmjs.com/package/semver

Using NPM from your console, modify and install the packages as such: npm install <module name> (i.e. npm install discord.js)

Getting your bot user

  1. Create your bot account at https://discordapp.com/developers/applications/me
  2. Make sure you create a bot user
  3. Add the bot to your server using the link https://discordapp.com/oauth2/authorize?client_id=CLIENT_ID&scope=bot&permissions=8

Filling fields and execution

Fill in the respective details in configs/configuration.json. This includes your bot-token, and server ID.

Run the script using node <directory of bot folder>/bot.js. You should get a console message notifying you that the bot is ready if everything runs well. If that's all good, move on to the next part on setting up channels and roles!

Successful console log

The successful initialisation console log should look something like this - you can key commands directly into the console too!