The Llama bot is a discord bot made for the
LP community discord server.
- 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)
- Create a new application from the Discord Developer Portal. Select one if you already have it.
- Go to the
Bot
tab and convert your application to a discord bot. Be cautious since this operation is NOT REVERSIBLE. - Copy the bot token. This will be used during the Server setup.
- Head over to https://console.firebase.google.com and create a firebase project.
- Enable firestore database.
- Generate and download the service account key. This will be used during the Server setup.
- Assumes UNIX-like environment (Linux, BSD, Mac, etc.)
-
Clone this repository and open 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.TOKEN=PUT_YOUR_DISCORD_BOT_TOKEN_HERE TESTING=true # set it to false on production PREFIX_PROD=PUT_PRODUCTION_DEFAULT_PREFIX_HERE PREFIX_DEV=PUT_DEVELOPMENT_DEFAULT_PREFIX_HERE OWNER_IDS=ID1,ID2,ID3,...
-
Create
secret
directory in thesrc
directory, rename the firebase admin key generated during the Firebase setup tofirebase-adminsdk.json
, and put it in thesecret
directory. -
Build the bot.
yarn build
-
Install pm2 globally.
yarn global add pm2
-
Start the bot.
pm2 start build/index.js --watch --name "Llama Bot"
Option Explanation --watch
Auto restart bot if bot files have been changed --name "Llama Bot"
Set the name of the process so it can be easily recognized -
Make the process automatically start on boot.
pm2 startup
- discord developers documentation
- discord API's javascript implementation documentation, guide, and bot framework documentation
- firebase admin sdk documentation
- pm2 documentation
Dabidoo#9888 (265697563280146433)
for making the colored logoSɪʟᴋ Sᴘɪᴅᴇʀ#8364 (419184817368858644)
for making the white logo