-
Notifications
You must be signed in to change notification settings - Fork 8
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.
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.
Make a local copy of the bot's code onto your machine.
This bot has four dependencies:
-
Discord.js
- https://discord.js.org/#/ request
-
request-promise
- https://github.com/request/request-promise -
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
)
- Create your bot account at https://discordapp.com/developers/applications/me
- Make sure you create a bot user
- Add the bot to your server using the link
https://discordapp.com/oauth2/authorize?client_id=CLIENT_ID&scope=bot&permissions=8
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!
The successful initialisation console log should look something like this - you can key commands directly into the console too!