> ## Documentation Index
> Fetch the complete documentation index at: https://docs.celestia.rest/llms.txt
> Use this file to discover all available pages before exploring further.

# Powershield

> Protect your server against command abuse by moderators

## Overview

Powershield monitors moderator command usage and automatically punishes abuse. Set thresholds per command — if someone triggers a moderation command too many times within a time window, they get stripped, kicked, or banned. You can also lock the command server-wide after abuse is detected.

<Warning>
  Powershield only works with commands in the **Moderation** category. The server owner is always exempt and cannot be punished.
</Warning>

***

## Access

Powershield is restricted to the **Server Owner**, \*\*Extra Owners and **Antinuke Admins**. Regular members and moderators cannot configure it.

***

## Control Panel

Running `~powershield` with no arguments opens the interactive control panel where you can enable or disable the system, set a log channel, and view configured rules.

```bash theme={null}
~powershield
```

**Panel Buttons:**

* **Enable / Disable** — Toggle Powershield on or off
* **Set Log** — Set the channel where abuse actions are logged
* **Help** — Open the paginated help menu

***

## Commands

<AccordionGroup>
  <Accordion title="powershield (panel)" icon="gauge">
    Opens the Powershield control panel.

    <CodeGroup>
      ```bash Syntax theme={null}
      ~powershield
      ```

      ```bash Example theme={null}
      ~powershield
      ~ps
      ```
    </CodeGroup>

    **What It Shows:**

    * Current enabled/disabled status
    * Configured log channel
    * All active rules

    **Aliases:** `ps`\
    **Permissions:** Server Owner / Antinuke Admin
  </Accordion>

  <Accordion title="powershield (set rule)" icon="sliders">
    Set a rule for a moderation command. If someone triggers it more than the threshold within the time window, they get punished.

    <CodeGroup>
      ```bash Syntax theme={null}
      ~powershield <cmd> <threshold> <window> <punishment> [lockdown]
      ```

      ```bash Example theme={null}
      ~powershield ban 3 10m strip
      ~powershield kick 5 1h ban
      ~powershield ban 3 10m strip 5m
      ```
    </CodeGroup>

    **Parameters:**

    * **cmd** — The moderation command to watch (e.g. `ban`, `kick`)
    * **threshold** — How many uses trigger the punishment
    * **window** — Time window to count uses in (`30s`, `5m`, `1h`)
    * **punishment** — What happens when threshold is hit: `strip`, `kick`, or `ban`
    * **lockdown** — Optional. Locks the command for everyone in the server for this duration after abuse is detected (`5m`, `1h`, etc.)

    **Punishments:**

    * `strip` — Removes all roles from the abuser
    * `kick` — Kicks the abuser from the server
    * `ban` — Bans the abuser from the server

    **Aliases:** `ps`\
    **Permissions:** Server Owner / Antinuke Admin
  </Accordion>

  <Accordion title="powershield remove" icon="trash">
    Remove a configured rule for a command.

    <CodeGroup>
      ```bash Syntax theme={null}
      ~powershield remove <cmd>
      ```

      ```bash Example theme={null}
      ~powershield remove ban
      ~ps remove kick
      ```
    </CodeGroup>

    **Aliases:** `ps`\
    **Permissions:** Server Owner / Antinuke Admin
  </Accordion>

  <Accordion title="powershield exempt" icon="user-shield">
    Exempt a role or user from Powershield tracking. Exempted members can use commands freely without being counted.

    <CodeGroup>
      ```bash Syntax theme={null}
      ~powershield exempt <@role/@user>
      ~powershield exempt remove <@role/@user>
      ```

      ```bash Example theme={null}
      ~powershield exempt @Admins
      ~powershield exempt @John
      ~powershield exempt remove @Admins
      ```
    </CodeGroup>

    **Notes:**

    * Server owner is always exempt and cannot be tracked
    * Supports both role and user mentions or IDs

    **Aliases:** `ps`\
    **Permissions:** Server Owner / Antinuke Admin
  </Accordion>

  <Accordion title="powershield setlog" icon="scroll">
    Set the channel where Powershield abuse actions are logged.

    <CodeGroup>
      ```bash Syntax theme={null}
      ~powershield setlog <#channel>
      ```

      ```bash Example theme={null}
      ~powershield setlog #mod-logs
      ~ps setlog 123456789
      ```
    </CodeGroup>

    **Aliases:** `ps`\
    **Permissions:** Server Owner / Antinuke Admin
  </Accordion>

  <Accordion title="powershield status" icon="circle-info">
    Shows all configured rules, exemptions, and current system settings.

    <CodeGroup>
      ```bash Syntax theme={null}
      ~powershield status
      ```

      ```bash Example theme={null}
      ~powershield status
      ~ps status
      ```
    </CodeGroup>

    **Information Shown:**

    * Enabled/disabled status
    * Configured log channel
    * All active rules with threshold, window, punishment, and lockdown
    * Exempt roles and users

    **Aliases:** `ps`\
    **Permissions:** Server Owner / Antinuke Admin
  </Accordion>
</AccordionGroup>

***

## Time Format

Windows and lockdown durations use a simple format:

| Format | Duration   |
| ------ | ---------- |
| `30s`  | 30 seconds |
| `5m`   | 5 minutes  |
| `1h`   | 1 hour     |

***

## How Lockdown Works

When a lockdown duration is set on a rule and abuse is detected, the command is locked for **everyone** in the server for that duration — including legitimate moderators. This prevents further abuse while you respond to the incident.

```bash theme={null}
# Ban command: 3 uses in 10 minutes = strip, then lock ~ban for 5 minutes
~powershield ban 3 10m strip 5m
```

<Note>
  Lockdown affects all users in the server, including exempt ones. Plan your lockdown durations accordingly.
</Note>

***

## Aliases

<Card title="ps" icon="shield">
  Main alias for all Powershield commands
</Card>

***

## Usage Examples

<Tabs>
  <Tab title="Basic Rules">
    ```bash theme={null}
    # Punish after 3 bans in 10 minutes
    ~powershield ban 3 10m strip

    # Punish after 5 kicks in 1 hour
    ~powershield kick 5 1h ban

    # Punish with ban after 2 mutes in 30 seconds
    ~powershield mute 2 30s ban
    ```
  </Tab>

  <Tab title="With Lockdown">
    ```bash theme={null}
    # Strip + lock ban command for 5 minutes
    ~powershield ban 3 10m strip 5m

    # Ban + lock kick command for 1 hour
    ~powershield kick 5 30m ban 1h
    ```
  </Tab>

  <Tab title="Exemptions">
    ```bash theme={null}
    # Exempt an entire role
    ~powershield exempt @Admins

    # Exempt a specific user
    ~powershield exempt @John

    # Remove exemption
    ~powershield exempt remove @Admins
    ```
  </Tab>

  <Tab title="Management">
    ```bash theme={null}
    # Open control panel
    ~powershield

    # View all rules and exemptions
    ~powershield status

    # Remove a rule
    ~powershield remove ban

    # Set log channel
    ~powershield setlog #mod-logs
    ```
  </Tab>
</Tabs>

***

## Related Features

<CardGroup cols={2}>
  <Card title="Antinuke" icon="shield" href="/antinuke">
    Protect against server nukes and permission abuse
  </Card>

  <Card title="Antinuke Administrators" icon="user-shield" href="/antinuke-administrators">
    Manage who has access to security commands
  </Card>
</CardGroup>
