Skip to content

Instantly share code, notes, and snippets.

@SUPERCHIEFYT
Last active September 6, 2022 09:41
Show Gist options
  • Save SUPERCHIEFYT/b80d50e75a774180487ce70efc7c366b to your computer and use it in GitHub Desktop.
Save SUPERCHIEFYT/b80d50e75a774180487ce70efc7c366b to your computer and use it in GitHub Desktop.
This details how to selfhost Logger

Logger Selfhosting Guide


FAQ

  • If you're selfhosting the bot, say so in #selfhosting-support so I can add you to the beta tester channel to get the newest updates
  • If you need help use: #selfhosting-support in the support server
  • The @Patron Logger#2596 bot's code is private, meaning none of the public code will have the premium features, you could add them yourself however.

Links


Version: exe

Click to see the exe selfhosting instructions

FAQ

  • For who was using the exe selfhost bot and those who use the github version, you should do this:

  • exe: -> Download new zip and extract the new loggerv3-win exe over your current. -> Go to the discord developer applications page and flip the "Server Members" intent switch for your bot application & save.

  • GitHub: -> Checkout or merge into your branch the branch intents -> Go to the discord developer applications page and flip the "Server Members" intent switch for your bot application & save.

Selfhosting via exe OR GitHub will NOT give you patron features, you will have to add that yourself!


Getting Started

Don't want to do manual effort setting up the bot via source? Well then, this method is the way for you!

  • Download the proper zip for your operating system (will be updated below)
  • Extract all of the files in the zip to a folder together
  • Rename config.txt.example to config.txt
  • Fill out all values in the config.txt file
  • Run the executable
  • Navigate to http://localhost:8082/ in your browser
  • ??? Profit! That's it!

Download Links

The download files/links is in the #selfhosting-guide channel in the support server


Version: 3

This is the recommended version for selfhosting Logger

Click to see the version 3 selfhosting instructions

FAQ

  • How to enable text commands for the bot -> Add the following to your .env file
ENABLE_TEXT_COMMANDS="true"
  • How to enable slash commands for the bot -> Follow the text commands steps then do the following command: <prefix>setcmd global (example: !setcmd global)

  • .env fields (BEZERK_URI and BEZERK_SECRET) are not required, leave them blank, like below.

BEZERK_URI=
BEZERK_SECRET=

You'll need PostgreSQL 11, Redis, NodeJS

  • Setup Postgres and add a superuser (default user works)
  • Clone the bot repo and enter the created folder (or use: git clone https://github.com/curtisf/logger)
  • If you clone it from github use: git checkout development (master is outdated)
  • Copy .env.example into .env
  • Fill out all fields in it (even Sentry unless you hotpatch it out)
  • Run npm i
  • Run node src/miscellaneous/generateDB.js
  • Run node index.js (This should start the bot)

Links


Version: 2

WARNING: Version 2 is HEAVILY outdated and will not be updated, along with that the Discord Gateway and API version the bot uses is also heavily outdated and will be removed by Discord sometime in the future.

Use version 3 with the instructions listed above Version 2

Click to see the version 2 selfhosting instructions

Getting Started

  • Install node.js LTS & Python 2
  • Download rethinkdb, Redis, git (bash) for Windows (Links below)
  • Use notepad++, Visual Studio Code or a similar config editor
  • Navigate to your desktop or documents folder using file explorer
  • Right click in the white space and click open git bash here
  • Type git clone https://github.com/curtisf/loggerv2 then git checkout development
  • Type npm i and wait for it to finish
  • Run rethinkdb.exe wherever you downloaded it (dragging it to the newly created folder from the git clone is a good idea)
  • Run redis.exe wherever you downloaded it.
  • Open the browser of your choice and go to http://localhost:8080
  • Click on Tables and click Add database
  • Type Logger (caps matters) and press enter to create the db
  • Find [Database] Logger and click add table
  • Type Guilds and press enter to create the table
  • Click add table again and type Users and press enter to create the table
  • Go back to the folder that you made from git clone
  • Copy botconfig.example.json to botconfig.json
  • Open botconfig.json using your editor and leave the "url": "xd" blank (i.e: "url": "")
  • In the same terminal that you typed git clone in:
  • Windows: npm run-script build-win
  • Linux: npm run-script build-linux
  • Type: npm ./dist/Logger.js

Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment