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

# Pagination Messages

> Turn an embed into a multi-page message members can flip through.

## Overview

A paginator is an embed with extra pages attached. Confine adds ◀️ and ▶️ reactions, and members use those to move between pages without the message ever changing position in the channel.

<Info>
  Requires **Manage Messages**. Up to **10 pages** per paginator.
</Info>

## Setting it up

<Steps>
  <Step title="Post the embed">
    Build an embed with confine and send it to the channel where you want the paginator to live. See [Embed Scripting](/resources/scripting) for the syntax.

    <Warning>
      Only messages confine can edit work here — Discord doesn't let bots edit other users messages.
    </Warning>
  </Step>

  <Step title="Turn it into a paginator">
    Right-click the message, copy its link, and hand it to confine.

    <CodeGroup>
      ```javascript Syntax theme={null}
          ,pagination set (message link)
      ```

      ```javascript Example theme={null}
          ,pagination set https://discord.com/channels/...
      ```
    </CodeGroup>

    The existing embed becomes page 1, its footer updates to show the page count, and the navigation reactions get added.
  </Step>

  <Step title="Add more pages">
    Each page is its own embed script. Run this once per page you want.

    <CodeGroup>
      ```javascript Syntax theme={null}
          ,pagination add (message link) (embed code)
      ```

      ```javascript Example theme={null}
          ,pagination add https://discord.com/channels/... {embed}$v{title: Page 2}$v{description: More info here}
      ```
    </CodeGroup>
  </Step>
</Steps>

## Editing pages

### Changing one

<CodeGroup>
  ```javascript Syntax theme={null}
  ,pagination update (message link) (page number) (embed code)
  ```

  ```javascript Example theme={null}
  ,pagination update https://discord.com/channels/... 2 {embed}$v{title: Updated}
  ```
</CodeGroup>

Confine asks you to confirm before overwriting. The prompt only responds to whoever ran the command and expires after 30 seconds.

### Removing one

<CodeGroup>
  ```javascript Syntax theme={null}
  ,pagination remove (message link) (page number)
  ```

  ```javascript Example theme={null}
  ,pagination remove https://discord.com/channels/... 2
  ```
</CodeGroup>

<Info>
  Page 1 can't be removed — it's the message itself. Use `,pagination delete` to take the whole thing apart.
</Info>

## Removing a paginator

```javascript theme={null}
,pagination delete (message link)
```

Clears the navigation reactions and drops all the pages. The message stays in the channel showing whatever page it was on.

`,pagination reset` does the same to every paginator in the server, behind a confirmation prompt.

## Fixing broken navigation

If someone clears the reactions, the arrows stop working. Put them back:

```javascript theme={null}
,pagination restorereactions (message link)
```

## Listing paginators

`,pagination list` shows every paginator in the server with a jump link and its page count.
