Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.
/ llama-bot Public archive

A discord bot made for the LP community discord server

License

Notifications You must be signed in to change notification settings

developomp/llama-bot

Repository files navigation

Llama bot

example image of bot usage

The Llama bot is a discord bot made for the LP community discord server.

Setting up

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

  1. Create a new application from the Discord Developer Portal. Select one if you already have it.
  2. Go to the Bot tab and convert your application to a discord bot. Be cautious since this operation is NOT REVERSIBLE.
  3. Copy the bot token. This will be used during the Server setup.

Firebase

  1. Head over to https://console.firebase.google.com and create a firebase project.
  2. Enable firestore database.
  3. Generate and download the service account key. This will be used during the Server setup.

Server

  • Assumes UNIX-like environment (Linux, BSD, Mac, etc.)
  1. Clone this repository and open it.

    git clone https://github.com/llama-bot/llama-bot.git
    cd llama-bot
  2. Install dependencies.

    yarn install
  3. 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,...
  4. Create secret directory in the src directory, rename the firebase admin key generated during the Firebase setup to firebase-adminsdk.json, and put it in the secret directory.

  5. Build the bot.

    yarn build
  6. Install pm2 globally.

    yarn global add pm2
  7. 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
  8. Make the process automatically start on boot.

    pm2 startup

More info

Special thanks

  • Dabidoo#9888 (265697563280146433) for making the colored logo
  • Sɪʟᴋ Sᴘɪᴅᴇʀ#8364 (419184817368858644) for making the white logo

About

A discord bot made for the LP community discord server

Resources

License

Stars

Watchers

Forks