/LDAB

Discord bot to interface our global Discord user banlist API.

Primary LanguageTypeScriptCreative Commons Attribution Share Alike 4.0 InternationalCC-BY-SA-4.0

LDAB

Linked Discord Administrative Bot

LDAB uses a Google sheets banlist to detect blacklisted users in other servers and act accordingly. It can perform any of the following actions when a blacklist user joins a server:

  • Ban them
  • Time them out
  • Give them a role
  • Notify admins
  • Make a discussion channel

It can also perform multiple actions, e.g. timing out and notifying admins. By default it will do nothing however, so be sure to check out the command guide to configure LDAB for your server.

Invite Link

Its recommended you:

  • Don't auto ban users.
  • Have any notification/feed channels be admin-only.
  • Use the /scan command once you've added LDAB to your server.

Command Guide

Once you've invited LDAB to you server, you'll need to do some configuration so it knows how to act when a blacklisted user joins, along with some other stuff:

  • /actions

    • Manage the actions taken when a blacklisted user joins the server.
    • Note that with auto-role actions, the role must be below LDAB in the hierarchy.
  • /notifications

    • If a notifications channel is specified, LDAB will send messages there whenever a user is added or removed from the global banlist.
    • Will not send messages about users who aren't in the server.
  • /adminrole

    • Manage the role allowed to use the /scan, /ping and /query commands.
    • See command permissions for more details.
  • /scan

    • Checks if any of the people in the server are also in the blacklist.
  • /query

    • Check if a single user is in the banlist.
  • /ping

    • Check if the bot is up.

Command Permissions

  • Users with the administrator permission can use all commands.
  • Users with the designated admin role (check this with /adminrole) can use the following commands:
    • /scan
    • /query
    • /ping

Limitations

LDAB is built to be a simple bot, more complicated actions are left to the server moderators to handle. Such actions may include:

  • Initiating a vote between admins
  • Acting based on the "severity" of the offense
  • Pre-emptively banning everyone on the banlist
  • Unban users

Permissions

LDAB uses the following permissions, scopes, and intents for administrative tasks.

Permissions
Permission Reason
Manage Roles Assign a role to blacklisted users
Ban Members Ban blacklisted users
Moderate Members Time out blacklisted users
Send Messages Inform admins of a user
Create Public Threads Enable discussion of a user
Send Messages in Threads Same as send messages
Scopes
Scope Reason
bot Utilize bot functionality
applications.commands Respond to slash commands
Intents
Intent Reason
Server Members Scan existing members for blacklisted users

Installation

If you want to set up your own version of the bot, please follow these steps.

Instructions
  1. Create an application on Discord with the permissions, scopes, and intents listed in permissions.
  2. Make an auth.json file with the entries filled out as per the example.
  3. Install dependencies using yarn or npm install.
  4. Start the bot in development mode using yarn dev or npm run dev.
  5. Make a production-ready build using yarn build or npm run build.
  6. Start the bot in production mode using yarn start or node .