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

# Fake Permissions

> Restrict server moderators to use commands through Haunt

<Info>Check out the available permissions that Haunt provides for fake permissions [here](/resources/permissions).</Info>
<Warning>Fake permissions can only be granted by the **server owner**.</Warning>

### What are Fake Permissions?

Fake permissions allow you grant **roles** access to Haunt's commands under a specific **permission** without needing to give them any dangerous permissions.<br />
This is useful incase any one of your moderators decides to go rogue in your server.

### What's an Example?

Whenever a role is granted a fake permission for example `manage roles`, Anyone with that role can use commands from Haunt that have the `manage roles` permission.<br />

<Frame>
  <img src="https://mintcdn.com/haunt-74016d1b/OBTME_BsucAM_ri7/images/security/fakepermissions/permission.png?fit=max&auto=format&n=OBTME_BsucAM_ri7&q=85&s=a4e807f29ebb024b38571eb1b3d8f68c" width="601" height="354" data-path="images/security/fakepermissions/permission.png" />
</Frame>

### How do I setup fake permissions?

<AccordionGroup>
  <Accordion title="Grant fake permissions to a role">
    <CodeGroup>
      ```javascript Syntax theme={null}
      ;fake grant (role) (permission)
      ```

      ```javascript Example theme={null}
      ;fake grant @admin kick members
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Revoke fake permissions from a role">
    <CodeGroup>
      ```javascript Syntax theme={null}
      ;fake revoke (role) (permission)
      ```

      ```javascript Example theme={null}
      ;fake revoke @admin manage roles
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="View what roles have been granted fake permissions">
    <Info>You can optionally specify a role to only view the fake permissions of that role.</Info>

    <CodeGroup>
      ```javascript Syntax theme={null}
      ;fake view [role]
      ```

      ```javascript Example theme={null}
      ;fake view @admin
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Clearing every role from using fake permissions">
    <CodeGroup>
      ```javascript Syntax theme={null}
      ;fake clear
      ```

      ```javascript Example theme={null}
      ;fake clear
      ```
    </CodeGroup>
  </Accordion>
</AccordionGroup>

### Recommended Permissions

<Tabs>
  <Tab title="Moderator">
    * `manage messages`: Grants anyone with the role to **manage message**s.
    * `manage nicknames`: Grants anyone with the role to manage nicknames.
    * `mute members`: Grants anyone with the role to mute members.
    * `kick members`: Grants anyone with the role to kick members.
    * `ban members`: Grants anyone with the role to kick members.
    * `ban members`: Grants anyone with the role to ban members.
    * `manage roles`: Grants anyone with the role to manage roles in the server.
    * `manage channels`: Grants anyone with the role to manage channels in the server.

    ```javascript theme={null}
    ;fake grant (role) manage nicknames, manage messages
    ```
  </Tab>

  <Tab title="Administrator">
    * `administrator`: Grants every **permission** to every **command** except for **server owner** commands.

    ```javascript theme={null}
    ;fake grant (role) administrator
    ```
  </Tab>

  <Tab title="Co Owner">
    * `owner`: Grants every **permission** and access to \**server owner* commands.

    ```javascript theme={null}
    ;fake grant (role) owner
    ```
  </Tab>
</Tabs>
