Skip to main content

Overview

The getmail command retrieves the email address that a user used during the verification process. This is useful for administrative purposes when you need to verify a user’s registration details.
This command requires the MANAGE_GUILD permission and can only be used by server administrators.

Command Signature

/getmail <user>

Parameters

user
User
required
The Discord user whose email address you want to retrieve

Permissions Required

  • MANAGE_GUILD (Manage Server permission)
  • Command responses are ephemeral (only visible to the command executor)

Usage Examples

Retrieve a user’s email

/getmail @john_doe
Response if verified:
@john_doe is verified with john.doe@university.edu
Response if not verified:
@john_doe is not verified

Implementation Details

This command queries the verified_users database table to retrieve the email address associated with a user’s Discord ID. Source reference: src/commands/administration.rs:41-70

Database Query

The command executes the following SQL query:
SELECT * FROM verified_users WHERE user_id = $1

Privacy Note

Since this command reveals personally identifiable information (email addresses), it:
  • Requires elevated permissions (MANAGE_GUILD)
  • Sends responses ephemerally (only visible to the command executor)
  • Should only be used when administratively necessary

Build docs developers (and LLMs) love