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

# Archive

> Archive channels by privating them and recreating fresh ones in their place

## Overview

The archive system lets you retire a channel without losing its history. When a channel is archived, it gets renamed, hidden from everyone, and optionally moved to a dedicated archive category — while a fresh replacement channel is created in its original spot with the same name and permissions.

<Info>
  Archive records are saved automatically, so any archived channel can be fully restored later with `archive remove`.
</Info>

***

## Commands

<AccordionGroup>
  <Accordion title="archive" icon="box-archive">
    Archive a channel by hiding it and creating a fresh replacement in its place.

    <CodeGroup>
      ```bash Syntax theme={null}
      ~archive [#channel]
      ```

      ```bash Examples theme={null}
      ~archive #general
      ~arch #announcements
      ```
    </CodeGroup>

    **Parameters:**

    * **channel** *(optional)* — Channel mention or ID. Defaults to the current channel if not specified.

    **What It Does:**

    * Prompts for confirmation before proceeding
    * Creates a new channel in the same position with the same name, topic, and permissions
    * Renames the original to `archived-{name}` and hides it from everyone
    * Moves it to the archive category (if one is set)
    * Transfers any Welcome, Goodbye, or JoinPing settings to the new channel

    **Aliases:** `arch`\
    **Permissions:** Administrator\
    **Cooldown:** 30 seconds
  </Accordion>

  <Accordion title="archive remove" icon="rotate-left">
    Undo an archive — restore the original channel and delete the replacement.

    <CodeGroup>
      ```bash Syntax theme={null}
      ~archive remove <#channel>
      ```

      ```bash Examples theme={null}
      ~archive remove #general
      ~arch remove #general
      ```
    </CodeGroup>

    **Parameters:**

    * **channel** — The replacement channel created during archiving (mention or ID)

    **What It Does:**

    * Restores the original channel's name, position, category, and permissions
    * Transfers Welcome, Goodbye, and JoinPing settings back to the restored channel
    * Deletes the replacement channel

    <Warning>
      The original archived channel must still exist in the server for a restore to work. If it was manually deleted, restoration is not possible.
    </Warning>

    **Aliases:** `arch`\
    **Permissions:** Administrator
  </Accordion>

  <Accordion title="archive category" icon="folder">
    Set a category where archived channels get moved to.

    <CodeGroup>
      ```bash Syntax theme={null}
      ~archive category <categoryId>
      ```

      ```bash Examples theme={null}
      ~archive category 1234567890123456789
      ~arch category 1234567890123456789
      ```
    </CodeGroup>

    **Parameters:**

    * **categoryId** — The ID of a category channel

    **What It Does:**

    * Archived channels are automatically moved into this category
    * Channels remain hidden from everyone regardless of the category's settings
    * Run `~archive category` with no arguments to view the currently set category

    **Aliases:** `arch`\
    **Permissions:** Administrator
  </Accordion>

  <Accordion title="archive category clear" icon="folder-minus">
    Remove the configured archive category.

    <CodeGroup>
      ```bash Syntax theme={null}
      ~archive category clear
      ```

      ```bash Examples theme={null}
      ~archive category clear
      ~arch category clear
      ```
    </CodeGroup>

    **What It Does:**

    * Clears the archive category setting
    * Future archived channels will stay in their original category instead of being moved

    **Aliases:** `arch`\
    **Permissions:** Administrator
  </Accordion>
</AccordionGroup>

***

## How It Works

<Steps>
  <Step title="(Optional) Set an Archive Category">
    Point archived channels to a dedicated category so they stay organized:

    ```bash theme={null}
    ~archive category 1234567890123456789
    ```

    Skip this step if you want archived channels to remain in their original category.
  </Step>

  <Step title="Archive a Channel">
    Run the command and confirm the prompt:

    ```bash theme={null}
    ~archive #general
    ```

    The bot will ask for confirmation. Click **Confirm** to proceed or **Cancel** to abort.
  </Step>

  <Step title="A Fresh Channel is Created">
    * A new `#general` appears in the same position with the same permissions
    * The original is renamed `#archived-general`, hidden, and moved to the archive category (if set)
    * A message is posted in the new channel to let members know it's a fresh start
  </Step>

  <Step title="Restore if Needed">
    Restore the original channel at any time:

    ```bash theme={null}
    ~archive remove #general
    ```

    The original is fully restored and the replacement is deleted.
  </Step>
</Steps>

***

## Archive Category

<CardGroup cols={2}>
  <Card title="Set Category" icon="folder-plus">
    ```bash theme={null}
    ~archive category <id>
    ```

    Archived channels move here automatically.
  </Card>

  <Card title="View Category" icon="eye">
    ```bash theme={null}
    ~archive category
    ```

    Shows the currently configured archive category.
  </Card>

  <Card title="Clear Category" icon="folder-minus">
    ```bash theme={null}
    ~archive category clear
    ```

    Archived channels stay in their original category.
  </Card>

  <Card title="Tip" icon="lightbulb">
    Create a dedicated **📦 Archives** category and lock it down so only staff can see it.
  </Card>
</CardGroup>

***

## What Gets Preserved

When a channel is archived and later restored, the following are fully saved and recovered:

<CardGroup cols={2}>
  <Card title="Channel Data" icon="database">
    * Original channel name
    * Position in the channel list
    * Parent category
    * All permission overwrites
  </Card>

  <Card title="Bot Settings" icon="gear">
    * Welcome message channel
    * Goodbye message channel
    * JoinPing channel
  </Card>
</CardGroup>

***

## Permission Requirements

<CardGroup cols={2}>
  <Card title="Bot Permissions" icon="robot">
    * Manage Channels
    * View Channels
    * Send Messages
    * Manage Roles
  </Card>

  <Card title="User Permissions" icon="user">
    * **Administrator** — Required for all archive commands
  </Card>
</CardGroup>

***

## Aliases

<CardGroup cols={2}>
  <Card title="archive" icon="box-archive">
    Main command
  </Card>

  <Card title="arch" icon="box">
    Short alias
  </Card>
</CardGroup>

***

## Usage Examples

<Tabs>
  <Tab title="Basic Archive">
    ```bash theme={null}
    # Archive the current channel
    ~archive

    # Archive a specific channel
    ~archive #off-topic

    # Using the short alias
    ~arch #off-topic
    ```
  </Tab>

  <Tab title="Restore Archive">
    ```bash theme={null}
    # Restore using the replacement channel
    ~archive remove #general

    # Using the short alias
    ~arch remove #general
    ```
  </Tab>

  <Tab title="Category Setup">
    ```bash theme={null}
    # Set an archive category
    ~archive category 1234567890123456789

    # View current category
    ~archive category

    # Clear the category
    ~archive category clear
    ```
  </Tab>

  <Tab title="Full Workflow">
    ```bash theme={null}
    # 1. Set up your archive category once
    ~archive category 1234567890123456789

    # 2. Archive a channel when needed
    ~archive #general

    # 3. Restore it later if needed
    ~archive remove #general
    ```
  </Tab>
</Tabs>

***

## Common Use Cases

<AccordionGroup>
  <Accordion title="Reset an active channel without losing history" icon="rotate-right">
    ```bash theme={null}
    ~archive #general
    ```

    The old messages are preserved in `#archived-general` (visible to staff), while members get a clean `#general` to start fresh in.
  </Accordion>

  <Accordion title="Retire a seasonal or event channel" icon="calendar">
    ```bash theme={null}
    ~archive #event-summer-2025
    ```

    The channel is hidden away but can be restored later for reference or a returning event.
  </Accordion>

  <Accordion title="Reorganize channels without losing data" icon="arrows-up-down-left-right">
    ```bash theme={null}
    ~archive #old-announcements
    ~archive #old-rules
    ```

    Keep the history accessible to staff while presenting members with a cleaner layout.
  </Accordion>

  <Accordion title="Undo a mistaken archive" icon="triangle-exclamation">
    ```bash theme={null}
    ~archive remove #general
    ```

    Restores the original channel fully — name, position, and permissions.
  </Accordion>
</AccordionGroup>

***

## Important Notes

<Warning>
  **Restore Requires the Original Channel**

  The `archived-{name}` channel must still exist for `archive remove` to work. If it was manually deleted, the restore cannot proceed.
</Warning>

<Warning>
  **Confirmation Required**

  Every archive action requires clicking **Confirm** in the bot's prompt. The confirmation expires after **15 seconds**.
</Warning>

<Info>
  **Best Practices**

  * Set up a dedicated archive category before archiving channels
  * Use `archive remove` instead of manually deleting archived channels
  * Run `archive help` for a full in-Discord command reference
</Info>

***

## Related Features

<CardGroup cols={2}>
  <Card title="Role Permissions (Permit)" icon="user-shield" href="/permit">
    Delegate archive access to staff roles without granting full Administrator
  </Card>

  <Card title="Enable/Disable Commands" icon="toggle-on" href="/enable-disable">
    Control whether the archive command is available server-wide
  </Card>
</CardGroup>
