ModMail is a Discord bot which main purpose is to provide users-to-moderators private communication. This bot needs to be hosted, as it is meant for a single Discord server.
Setting up this bot is pretty easy, just follow the steps below.
- Fork and clone this repo.
- Create a Discord application and get the bot token.
- Create a file called
.env
in the main directory. Add the following:BOT_TOKEN=YOU_TOKEN_GOES_HERE HOST=YOUR_HOST(READ_BELOW) URL=YOUR_REPLIT_URL
The host option is only required if Repl.it is going to be used. If so, the value must be
REPLIT
, if not, feel free to remove that line. If you are using Repl.it, provide the URL too (should look something like this:https://ProjectName--YourUsername.repl.co
). Paste that same URL here and click "ADD". - Run
npm run setup
. - Fill the
src/config.ts
file. - Run
npm run start
to start your bot. If you want to use any node runtime such as PM2, runnpm run build
and then start the process as you would normally do (fileprod/index.js
).
- Someone DMs your bot and a thread will be opened inside the specified category.
- Moderators get notified and start chatting with them via the bot.
reply {content} - Thread Only
close - Thread Only
set