Setting up
Use the dev branch (javascript) instead of the master branch (python).
This page will teach you how to set up the llama discord bot.
Result:
#
Steps#
Pre-requirements- Node.js 16.6.0+
- yarn
- A Discord account
- A Google Firebase account
A sacrifice to be given to the llama gods(no longer needed)
#
Discord- Create a new application from the Discord Developer Portal. Select one if you already have it. Be cautious though, since this operation is NOT REVERSIBLE.
- Make application a bot.
- Copy the bot token. This will be used during the Server setup.
#
FirebaseCreate a firebase project.
Create firestore database (production mode is highly recommended).
Generate and download the service account key. This will be used during the Server setup.
#
Botinfo
Assumes UNIX-like environment (Linux, BSD, Mac, etc.)
Clone the llama bot repository and
cd
into it.git clone https://github.com/llama-bot/llama-bot.git
cd llama-bot
Install dependencies.
yarn install
Create
.env
file in the project root and put the discord bot token generated during the Discord setup..envTOKEN=PUT_YOUR_DISCORD_BOT_TOKEN_HERE
Create
secret
directory in thesrc
directory, rename firebase admin key generated during the Firebase setup tofirebase-adminsdk.json
, and put it in thesecret
directory.
TODO: systemd and/or auto restart/reload pm2?
#
TestingAfter following all the steps, run the following command to start the bot:
yarn start
If everything is set up correctly, this should start the bot.
#
More info- discord developers documentation: https://discord.com/developers/docs
- discord API's javascript implementation documentation, guide, and bot framework documentation
- firebase admin sdk documentation: https://firebase.google.com/docs