# Moderation

### Quick Setup

1. Enable the log/feature you want.

   ```yaml
   Enabled: true
   ```
2. Replace `"CHANNEL_ID"` with your **actual log channel ID**.
3. (Optional) Customize embeds with placeholders.

👉 [**How to copy a Channel ID**](https://docs.drakodevelopment.net/getting-started/developer-mode-copying-ids)

***

### User Activity Logs

#### 🔄 Profile Changes

* Tracks username, avatar, and discriminator updates.

#### 🎭 Role Management

* Logs when users gain or lose roles (manual or automatic).

***

### Server Management Logs

#### 🖼 Server Changes

* Name changes, icon updates, and settings modifications.

#### #️⃣ Channel Management

* Channel creation/deletion.
* Permission changes.

***

### Message Activity Logs

#### ❌ Message Deletion

* Shows deleted content.
* Can include attachments if `LogImages: true`.
* Shows who deleted it (if available).

#### ✏️ Message Edits

* Logs before/after message content.

#### 📦 Purge Logs

* Logs bulk message deletes in a **single purge channel**.

***

### Voice Activity Logs

* Voice joins/leaves.
* Channel switches.
* Streaming activity.

***

### Moderation Logs

#### ⏳ Timeout System

* Logs timeouts applied/removed.

#### ⚠️ Warning System

* Configurable warning tiers & punishments.

```yaml
Warnings:
  Expiry: 30d
  Punishments:
    1:
      Timeout: ""
    2:
      Timeout: "10m"
    3:
      Timeout: "15m"
```

#### 🔨 Ban/Kick System

* Logs bans, unbans, and kicks with moderator info.

**Available placeholders:**

* `{user}` → Mentioned user
* `{userTag}` → Username#0000
* `{userId}` → User ID
* `{moderator}` → Staff member
* `{reason}` → Reason for action
* `{guildName}` → Server name
* `{longtime}` → Full date/time
* `{shorttime}` → Shortened time

***

### Security & Anti-Abuse Logs

#### 👤 Alt Prevention

* Blocks/kicks accounts younger than `TimeLimit` (e.g. `30d`).
* Sends DM & log embed if triggered.

#### ☢️ Anti-Nuke

* Protects from mass bans/kicks/channel/role deletes.
* Uses tiered thresholds with escalating actions (mute/remove role/ban).

#### 🔰 Anti-Hoist

* Removes special characters (`-`, `_`, `!`, etc.) from usernames.
* Optionally renames to a default like `zName`.

#### 👥 Anti-Mass Mention

* Prevents spam mentions (`@everyone` or multiple users).
* Can timeout offenders and DM them.

#### 🚫 Anti-Spam

* Limits how many messages can be sent in a short time.
* Example: `MsgLimit: 4` within `TimeLimit: "1s"`.
* Can timeout & DM the user.

#### 📝 Blacklist Words

* Deletes messages with blacklisted patterns.
* Supports wildcards (`*badword*`) and regex.
* Can whitelist roles, channels, or categories.

***

### Miscellaneous Logs

* 📥 Invite tracking
* 🎉 Giveaway logs
* 🗑 Purge logs (bulk deletions)
* 📝 Reports (user-submitted reports with jump-to-message links)

Example report log:

```yaml
Report:
  LogsChannelID: "CHANNEL_ID"
  Embed:
    Title: "📢 New Report"
    Description:
      - "**User:** {user}"
      - "**Content:** {message}"
      - "**Channel:** {channel}"
      - "**Reporter:** {reportingUser}"
      - "**Reason:** {reason}"
      - "**Date:** {timestamp}"
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.drakodevelopment.net/moderation-and-roles/moderation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
