Skip to content

Serverless discord bot to report message or user to mods

License

Notifications You must be signed in to change notification settings

AkimotoRyou/flagger

Repository files navigation

flagger

Serverless discord bot to report message or user to mods hosted on Vercel serverless function. Inspired by Yuudachi report commands, and discord-trout as the base.

Limitations

  1. Can only serve one discord server and webhook per instance, multi server will require modification to either use cloud database or adding list of servers and their webhook links.
  2. Can't determine whether same user or message are reported by multiple users.
  3. Mods need to manually punish false reports.

Requirements

Installation

  1. Invite your bot to your server with just application.commands scope.
  2. Prepare a private channel and a webhook leading to that channel for the logs.

    Doesn't have to be in same server.

  3. Download and extract all the files in this repository.
  4. Rename .env.example to .env and replace the values with your actual data.

    Token from Bot tab, public key and app id from General Information tab.

  5. Deploy to vercel serverless function.
  6. Add all of the .env variables to vercel project either from vercel cli or from vercel dashboard
  7. Copy your vercel project url and paste it to Discord Interactions Endpoint URL at General Information tab on Discord developer portal.

    Add /api at the end of the link too, it will look something like https://projectName-vercelUsername.vercel.app/api.