Skip to content

Plugin Idea: ModMail — private support messaging via bot DMs #29

Description

@DeadIndian

Plugin Idea: ModMail — private support messaging via bot

A ModMail/ModTicket system where members send DMs to the bot, which creates a dedicated private channel for staff to reply. All communication is relayed between the user (via DM) and staff (via channel). Popularized by DragonBot, ModMail, and Carl-bot.

Why

ModMail is a staple for support servers, community servers, and any server that needs private member-to-staff communication. Unlike the existing ticket system (which users open via commands in-server), ModMail lets users DM the bot from anywhere.

Spec

How It Works:

  1. User DMs the bot with a message
  2. Bot creates a #modmail-username private channel in a configured category
  3. Staff can see the user's message and reply in the channel
  4. Staff replies get relayed back to the user via DM
  5. Channel is archived/deleted when the thread is closed

Commands (Staff):

  • /modmail close [reason] — Close a ModMail thread (archives or deletes channel)
  • /modmail close-silent — Close without notifying user
  • /modmail reply <message> — Reply to user (or just type in the channel)
  • /modmail anon-reply <message> — Reply without showing staff name
  • /modmail log <user> — View ModMail history for a user
  • /modmail block <user> — Block a user from using ModMail
  • /modmail unblock <user> — Unblock a user
  • /modmail blacklist add <user> [reason] — Add user to blacklist
  • /modmail blacklist remove <user> — Remove user
  • /modmail snippet <name> — Send a saved response snippet
  • /modmail snippet create <name> <content> — Create a snippet

Commands (Admin):

  • /modmail-config category <category> — Set category for ModMail channels
  • /modmail-config staff-role <role> — Role that can see/reply to ModMail channels
  • /modmail-config log-channel <#channel> — Log of all closed threads
  • /modmail-config auto-response <message> — Auto-reply when user first DMs
  • /modmail-config cooldown <seconds> — Cooldown between user DMs
  • /modmail-config ping-role <role> — Role to ping on new thread

Features:

  • Thread Transcript — Generate HTML/JSON transcript on close
  • Snippets — Saved responses for common questions (saved per-server)
  • Anonymous Replies — Staff can reply without revealing their identity
  • Alert on New Thread — Ping staff role when new thread opens
  • User History — Search past ModMail sessions per user
  • Thread Status — Show open/closed/resolved status in channel topic
  • Auto-Close — Auto-close inactive threads after configurable timeout (default: 48h)

Integration:

  • Use ctx.registerEvent('messageCreate') for DM detection
  • Use ctx.registerCommand for staff commands
  • User data stored in MongoDB

Model:

// Thread
{
  threadId: String,       // auto-increment
  userId: String,
  channelId: String,      // staff-side channel ID
  guildId: String,
  status: String,         // 'open' | 'closed' | 'resolved'
  staffId: String,        // last assigned staff
  closedAt: Date,
  createdAt: Date
}

// Message
{
  threadId: String,
  content: String,
  senderType: String,     // 'user' | 'staff'
  staffId: String,        // if staff
  anonymous: Boolean,
  timestamp: Date
}

// Block list
{
  userId: String,
  guildId: String,
  reason: String,
  blockedBy: String,
  createdAt: Date
}

// Snippet
{
  guildId: String,
  name: String,
  content: String,
  createdAt: Date
}

Acceptance Criteria

  • User DM creates a private staff channel
  • Staff replies in channel relay to user DM
  • Close with transcript generation
  • Snippets for common responses
  • User blacklist
  • Staff role restriction

Metadata

Metadata

Assignees

No one assigned

    Labels

    new-pluginIdea for a brand new plugin (no repo exists yet)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions