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

# Invoke

> Customise the embeds raze sends when moderation commands are used.

# Invoke

> Customise the embeds raze sends when moderation commands are used.

## How it works

When a moderator runs a punishment command (e.g. `;ban`, `;kick`), raze sends two messages:

* **Channel message** — posted publicly in the channel where the command was run
* **DM** — sent privately to the punished member

The `invoke` system lets you replace both of these with a fully custom embed, per command. Set the channel message with `;invoke (command) message`, and the DM with `;invoke (command) dm`.

## Supported commands

<AccordionGroup>
  <Accordion icon="clock" title="timeout">
    <CodeGroup>
      ```bash Message theme={null} theme={null}
      ;invoke timeout message (embed code)
      ;invoke timeout message view
      ;invoke timeout message reset
      ```

      ```bash DM theme={null} theme={null}
      ;invoke timeout dm (embed code)
      ;invoke timeout dm view
      ;invoke timeout dm reset
      ```
    </CodeGroup>
  </Accordion>

  <Accordion icon="clock-rotate-left" title="untimeout">
    <CodeGroup>
      ```bash Message theme={null} theme={null}
      ;invoke untimeout message (embed code)
      ;invoke untimeout message view
      ;invoke untimeout message reset
      ```

      ```bash DM theme={null} theme={null}
      ;invoke untimeout dm (embed code)
      ;invoke untimeout dm view
      ;invoke untimeout dm reset
      ```
    </CodeGroup>
  </Accordion>

  <Accordion icon="shoe-prints" title="kick">
    <CodeGroup>
      ```bash Message theme={null} theme={null}
      ;invoke kick message (embed code)
      ;invoke kick message view
      ;invoke kick message reset
      ```

      ```bash DM theme={null} theme={null}
      ;invoke kick dm (embed code)
      ;invoke kick dm view
      ;invoke kick dm reset
      ```
    </CodeGroup>
  </Accordion>

  <Accordion icon="gavel" title="ban">
    <CodeGroup>
      ```bash Message theme={null} theme={null}
      ;invoke ban message (embed code)
      ;invoke ban message view
      ;invoke ban message reset
      ```

      ```bash DM theme={null} theme={null}
      ;invoke ban dm (embed code)
      ;invoke ban dm view
      ;invoke ban dm reset
      ```
    </CodeGroup>
  </Accordion>

  <Accordion icon="ban" title="unban">
    <CodeGroup>
      ```bash Message theme={null} theme={null}
      ;invoke unban message (embed code)
      ;invoke unban message view
      ;invoke unban message reset
      ```

      ```bash DM theme={null} theme={null}
      ;invoke unban dm (embed code)
      ;invoke unban dm view
      ;invoke unban dm reset
      ```
    </CodeGroup>
  </Accordion>

  <Accordion icon="shield-halved" title="softban">
    <CodeGroup>
      ```bash Message theme={null} theme={null}
      ;invoke softban message (embed code)
      ;invoke softban message view
      ;invoke softban message reset
      ```

      ```bash DM theme={null} theme={null}
      ;invoke softban dm (embed code)
      ;invoke softban dm view
      ;invoke softban dm reset
      ```
    </CodeGroup>
  </Accordion>

  <Accordion icon="skull" title="hardban">
    <CodeGroup>
      ```bash Message theme={null} theme={null}
      ;invoke hardban message (embed code)
      ;invoke hardban message view
      ;invoke hardban message reset
      ```

      ```bash DM theme={null} theme={null}
      ;invoke hardban dm (embed code)
      ;invoke hardban dm view
      ;invoke hardban dm reset
      ```
    </CodeGroup>
  </Accordion>

  <Accordion icon="triangle-exclamation" title="warn">
    <CodeGroup>
      ```bash Message theme={null} theme={null}
      ;invoke warn message (embed code)
      ;invoke warn message view
      ;invoke warn message reset
      ```

      ```bash DM theme={null} theme={null}
      ;invoke warn dm (embed code)
      ;invoke warn dm view
      ;invoke warn dm reset
      ```
    </CodeGroup>
  </Accordion>

  <Accordion icon="handcuffs" title="jail">
    <CodeGroup>
      ```bash Message theme={null} theme={null}
      ;invoke jail message (embed code)
      ;invoke jail message view
      ;invoke jail message reset
      ```

      ```bash DM theme={null} theme={null}
      ;invoke jail dm (embed code)
      ;invoke jail dm view
      ;invoke jail dm reset
      ```
    </CodeGroup>
  </Accordion>

  <Accordion icon="door-open" title="unjail">
    <CodeGroup>
      ```bash Message theme={null} theme={null}
      ;invoke unjail message (embed code)
      ;invoke unjail message view
      ;invoke unjail message reset
      ```

      ```bash DM theme={null} theme={null}
      ;invoke unjail dm (embed code)
      ;invoke unjail dm view
      ;invoke unjail dm reset
      ```
    </CodeGroup>
  </Accordion>
</AccordionGroup>

## Reactions

You can configure an invoke message to only add a reaction to your command instead of sending a message. To do this, use an embed script that contains no text or embeds, and only uses the `{reaction: (emoji)}` tag.

<CodeGroup>
  ```bash theme={null} theme={null}
  ;invoke ban message {reaction: 👍}
  ```

  ```bash theme={null} theme={null}
  ;invoke warn message {reaction: 🔴 && 🔵}
  ```
</CodeGroup>

## Variables

<Tip>
  All standard variables are available in invoke messages. See the full list at [variables](/resources/variables). Embed scripting syntax is documented at [embed scripting](/resources/scripting/embeds).
</Tip>

| Variable              | Value                                      |
| --------------------- | ------------------------------------------ |
| `{target.mention}`    | Mentions the member who was punished       |
| `{target.name}`       | Username of the punished member            |
| `{moderator.mention}` | Mentions the moderator who ran the command |
| `{moderator.name}`    | Username of the moderator                  |
| `{reason}`            | Reason passed to the command               |
| `{duration}`          | Duration of the punishment (timeout only)  |
