disco-bouncer

module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2023 License: MIT

README

disco-bouncer

A bouncer to ask users for their unique code upon entering a Discord server, so there isn't Panic! at the Disco(rd).

run it

You can run the server as a Docker container. Here is an example docker-compose configuration:

version: "3.9"

services:
  discobouncer:
    image: ghcr.io/kylrth/disco-bouncer:latest
    restart: unless-stopped
    depends_on:
      - postgres
    volumes:
      - ./data/discobouncer:/data
    ports:
      - 3000:80
    environment:
      DATABASE_URL: postgres://discobouncer:SuperSecretPassword@postgres/discobouncer?sslmode=disable
      DISCORD_TOKEN: <token retrieved when creating Discord bot>
  postgres:
    image: postgres:15
    user: 1000:1000
    restart: unless-stopped
    volumes:
      - ./data/postgres:/var/lib/postgresql/data
    environment:
      POSTGRES_PASSWORD: SuperSecretPassword
      POSTGRES_USER: discobouncer

Put this in docker-compose.yml, create the folders mkdir -p ./data/{discobouncer,postgres}, and start it with docker-compose up -d.

If you want to run the server without turning on the Discord bot, set DISCORD_TOKEN: disable. The API for editing users will still work, but the Discord bot will not.

using the client

Before using the client, you (or the server admin) need to create a new admin account:

docker-compose exec discobouncer /bouncer admin setpass testing ThisIsATest

Download the client from the releases page, and connect using the username and password you set:

BOUNCER_USER=testing BOUNCER_PASS=ThisIsATest ./client upload -s http://localhost:3000

For more information about how to use the client, run ./client -h.

Directories

Path Synopsis
cmd
internal
db
server
Package server implements a server for managing the users that will be accepted by the bouncer.
Package server implements a server for managing the users that will be accepted by the bouncer.
pkg
bouncerbot
Package bouncerbot implements the bouncer bot.
Package bouncerbot implements the bouncer bot.
client
Package client provides methods for accessing the discord bouncer REST API.
Package client provides methods for accessing the discord bouncer REST API.
encrypt
Package encrypt implements AES encryption helper functions for use with the bouncerbot.
Package encrypt implements AES encryption helper functions for use with the bouncerbot.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL