> ## 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.

# Button Roles

> Create self assignable roles with buttons in your server

## Create a Button Role

<Warning>You cannot assign roles that have **dangerous permissions**.</Warning>

<p>
  Start by using the `buttons create` command.<br />
  You can provide the **id**, **url** or reply to the message you want Haunt to use.
</p>

<CodeGroup>
  ```javascript Syntax theme={null}
  ;buttons create (message) (role) (style) [emoji] [label]
  ```

  ```javascript Example theme={null}
  ;buttons create 1377039379180290189 @Flower blue 🌸 Flowers
  ```

  ```javascript Example with Message Link theme={null}
  ;buttons create https://discord.com/channels/1363969049700073663/1373299901122740266/1377039379180290189 @Flower blue 🌸 Flowers
  ```
</CodeGroup>

<Frame>
  <img src="https://mintcdn.com/haunt-74016d1b/csHSSgi2LjzCramD/images/configuration/buttons/create.png?fit=max&auto=format&n=csHSSgi2LjzCramD&q=85&s=0c38a0f283273285470509f929b097b0" width="625" height="172" data-path="images/configuration/buttons/create.png" />
</Frame>

If everything worked correctly, then you should see that the **message** you provided now has a **button** on it.<br />

<Frame>
  <img src="https://mintcdn.com/haunt-74016d1b/csHSSgi2LjzCramD/images/configuration/buttons/message.png?fit=max&auto=format&n=csHSSgi2LjzCramD&q=85&s=5e32443adec054d767440610ea0309ff" width="459" height="225" data-path="images/configuration/buttons/message.png" />
</Frame>

## Delete a Button Role

<p>
  Delete a **button role** with the `buttons delete` command.<br />
  You can provide the **button Id** or the **role** that you used.
</p>

<CodeGroup>
  ```javascript Syntax theme={null}
  ;buttons delete (message) (button|role)
  ```

  ```javascript Example theme={null}
  ;buttons delete 1377039379180290189 1
  ```

  ```javascript Example with Message Link theme={null}
  ;buttons delete https://discord.com/channels/1363969049700073663/1373299901122740266/1377039379180290189 @Flower
  ```
</CodeGroup>

<Frame>
  <img src="https://mintcdn.com/haunt-74016d1b/csHSSgi2LjzCramD/images/configuration/buttons/delete.png?fit=max&auto=format&n=csHSSgi2LjzCramD&q=85&s=419dd4aef6eb95349c5b110142e87a1a" width="712" height="164" data-path="images/configuration/buttons/delete.png" />
</Frame>

## View every Button Role

<p>
  There are 2 variants of this command.<br />
  If you provide a **message** then you'll see the buttons under that message.
</p>

<CodeGroup>
  ```javascript Syntax theme={null}
  ;buttons view [message]
  ```

  ```javascript Example theme={null}
  ;buttons view https://discord.com/channels/1363969049700073663/1373299901122740266/1377039379180290189
  ```
</CodeGroup>

If you choose not to provide a **message** then it'll look like this.

<Frame>
  <img src="https://mintcdn.com/haunt-74016d1b/csHSSgi2LjzCramD/images/configuration/buttons/view.png?fit=max&auto=format&n=csHSSgi2LjzCramD&q=85&s=e07bd259eefcfbb832f856b4c61d4871" width="533" height="260" data-path="images/configuration/buttons/view.png" />
</Frame>

But if you chose to provide a **message** then you'll get to view the buttons under that message

<Frame>
  <img src="https://mintcdn.com/haunt-74016d1b/csHSSgi2LjzCramD/images/configuration/buttons/view-message.png?fit=max&auto=format&n=csHSSgi2LjzCramD&q=85&s=b55474a5be1ff40c1827a3b140102985" width="510" height="334" data-path="images/configuration/buttons/view-message.png" />
</Frame>

## Clear every Button Role

You can choose to clear every **button role** from a **message** or from the **entire server**.

<CodeGroup>
  ```javascript Syntax theme={null}
  ;buttons clear [message]
  ```

  ```javascript Example theme={null}
  ;buttons clear https://discord.com/channels/1363969049700073663/1373299901122740266/1377039379180290189
  ```
</CodeGroup>

<Frame>
  <img src="https://mintcdn.com/haunt-74016d1b/csHSSgi2LjzCramD/images/configuration/buttons/clear.png?fit=max&auto=format&n=csHSSgi2LjzCramD&q=85&s=7e6c093e86f94933ac70bd53a19a57c5" width="608" height="164" data-path="images/configuration/buttons/clear.png" />
</Frame>

## Update a Button Role

<p>
  There are currently **5** subcommands for **updating** the features of a **button role**.<br />
  Below are the **guides** to update a **button role** in the server.
</p>

### Update a Button Label

<CodeGroup>
  ```javascript Syntax theme={null}
  ;buttons update label (message) (button) (label)
  ```

  ```javascript Example theme={null}
  ;buttons update label https://discord.com/channels/1363969049700073663/1373299901122740266/1377039379180290189 1 Blooming
  ```
</CodeGroup>

<Frame>
  <img src="https://mintcdn.com/haunt-74016d1b/csHSSgi2LjzCramD/images/configuration/buttons/update-label.png?fit=max&auto=format&n=csHSSgi2LjzCramD&q=85&s=e08eaea5beb14eb4691fddf3e1edb8b5" width="501" height="170" data-path="images/configuration/buttons/update-label.png" />
</Frame>

### Update a Button Style

<CodeGroup>
  ```javascript Syntax theme={null}
  ;buttons update style (message) (button) (style)
  ```

  ```javascript Example theme={null}
  ;buttons update style https://discord.com/channels/1363969049700073663/1373299901122740266/1377039379180290189 1 Red
  ```
</CodeGroup>

<Frame>
  <img src="https://mintcdn.com/haunt-74016d1b/csHSSgi2LjzCramD/images/configuration/buttons/update-style.png?fit=max&auto=format&n=csHSSgi2LjzCramD&q=85&s=c97b290b7e515a7ae013b3a58132034b" width="489" height="159" data-path="images/configuration/buttons/update-style.png" />
</Frame>

### Update a Button emoji

<CodeGroup>
  ```javascript Syntax theme={null}
  ;buttons update emoji (message) (button) (emoji)
  ```

  ```javascript Example theme={null}
  ;buttons update emoji https://discord.com/channels/1363969049700073663/1373299901122740266/1377039379180290189 1 🌺
  ```
</CodeGroup>

<Frame>
  <img src="https://mintcdn.com/haunt-74016d1b/csHSSgi2LjzCramD/images/configuration/buttons/update-emoji.png?fit=max&auto=format&n=csHSSgi2LjzCramD&q=85&s=5b387483f2fbdf05e05e7e303ebdff51" width="503" height="163" data-path="images/configuration/buttons/update-emoji.png" />
</Frame>

### Update the role in a Button Role

<CodeGroup>
  ```javascript Syntax theme={null}
  ;buttons update role (message) (button) (role)
  ```

  ```javascript Example theme={null}
  ;buttons update role https://discord.com/channels/1363969049700073663/1373299901122740266/1377039379180290189 1 @Blossoms
  ```
</CodeGroup>

<Frame>
  <img src="https://mintcdn.com/haunt-74016d1b/csHSSgi2LjzCramD/images/configuration/buttons/update-role.png?fit=max&auto=format&n=csHSSgi2LjzCramD&q=85&s=e938d9ee19954e5ba7fbeb5af10e6bc1" width="431" height="170" data-path="images/configuration/buttons/update-role.png" />
</Frame>

### Move a Button Role to another Message

<CodeGroup>
  ```javascript Syntax theme={null}
  ;buttons update message (message) (button) (new message)
  ```

  ```javascript Example theme={null}
  ;buttons update message https://discord.com/channels/1363969049700073663/1373299901122740266/1377039379180290189 1 https://discord.com/channels/1363969049700073663/1376219450545537074/1520630899668947005
  ```
</CodeGroup>

<Frame>
  <img src="https://mintcdn.com/haunt-74016d1b/csHSSgi2LjzCramD/images/configuration/buttons/update-message.png?fit=max&auto=format&n=csHSSgi2LjzCramD&q=85&s=9e9358995626f7c7b11a0103325cbbaa" width="506" height="166" data-path="images/configuration/buttons/update-message.png" />
</Frame>
