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.
- 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.
- Can't determine whether same user or message are reported by multiple users.
- Mods need to manually punish false reports.
- Vercel account and Vercel CLI
- Discord account and a discord bot
- Invite your bot to your server with just
application.commands
scope. - Prepare a private channel and a webhook leading to that channel for the logs.
Doesn't have to be in same server.
- Download and extract all the files in this repository.
- Rename
.env.example
to.env
and replace the values with your actual data.Token from
Bot
tab, public key and app id fromGeneral Information
tab. - Deploy to vercel serverless function.
- Add all of the
.env
variables to vercel project either from vercel cli or from vercel dashboard - Copy your vercel project url and paste it to Discord
Interactions Endpoint URL
atGeneral Information
tab on Discord developer portal.Add
/api
at the end of the link too, it will look something likehttps://projectName-vercelUsername.vercel.app/api
.