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

# Antinuke Logs

> Configure a dedicated channel to monitor all antinuke events and security changes

## Overview

The Antinuke Logs system provides comprehensive logging of all security events, protection triggers, and configuration changes in your server. By setting up a dedicated log channel, you can monitor antinuke activity in real-time and maintain an audit trail of security incidents.

<Info>
  Log channels receive detailed information about every antinuke action, including who triggered protections, what actions were taken, and when settings were modified.
</Info>

***

## Access Control

Only the following can manage the log channel:

* **Server Owner** — Full access to configure log channel
* **Extra Owners** — Can set and modify the log channel
* **Antinuke Administrators** — Can set and modify log channel

<Note>
  Regular members cannot view or modify log channel settings, ensuring security event privacy.
</Note>

***

## Commands

<AccordionGroup>
  <Accordion title="setlog" icon="gear">
    Configure the log channel for your antinuke system. If no channel is specified, the bot will automatically create a "Celestia-logs" channel with proper permissions.

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

      ```bash Examples theme={null}
      ~setlog #security-logs
      ~setlog
      ~anlog #mod-logs
      ~logset
      ```
    </CodeGroup>

    **Aliases:** `anlog`, `logset`\
    **Permissions:** Server Owner or Antinuke Administrator

    <Tip>
      Running the command without arguments will auto-create a hidden "Celestia-logs" channel if one doesn't already exist.
    </Tip>
  </Accordion>

  <Accordion title="setlog (view status)" icon="eye">
    View your current log channel configuration and available options.

    <CodeGroup>
      ```bash Syntax theme={null}
      ~setlog
      ```

      ```bash Example theme={null}
      ~setlog
      ~anlog
      ~logset
      ```
    </CodeGroup>

    **Aliases:** `anlog`, `logset`\
    **Permissions:** Server Owner or Antinuke Administrator

    <Note>
      Running the command without arguments displays the current log channel and configuration instructions.
    </Note>
  </Accordion>
</AccordionGroup>

***

## What Gets Logged

The log channel records comprehensive information about all antinuke activities:

<Tabs>
  <Tab title="System Changes">
    Track system status modifications:

    * Antinuke system enable/disable
    * Protection module enable/disable
    * Antinuke administrator additions/removals
    * Log channel configuration
  </Tab>

  <Tab title="Protection Settings">
    Monitor protection configuration:

    * Protection punishment type changes
    * Protection punishment removals
    * Individual protection toggles
    * System-wide configuration updates
  </Tab>

  <Tab title="Security Events">
    Real-time protection activity:

    * Protection triggers and executions
    * Ban/kick/role actions detected
    * Channel manipulation attempts
    * Punishment executions
  </Tab>
</Tabs>

***

## Auto-Creation Feature

<Info>
  **Automatic Channel Setup**

  When you run `~setlog` without specifying a channel, Celestia will automatically create a secure log channel for you.
</Info>

**Auto-created channel features:**

* **Name:** Celestia-logs
* **Type:** Text channel
* **Visibility:** Hidden from @everyone
* **Permissions:** Bot and command executor can view
* **Topic:** Descriptive text indicating antinuke purpose

**Example:**

```bash theme={null}
~setlog
```

This will create a new channel or use an existing "Celestia-logs" channel.

***

## Setup Process

<Steps>
  <Step title="Choose Setup Method">
    Decide whether to use an existing channel or let the bot create one:

    **Option 1: Use existing channel**

    ```bash theme={null}
    ~setlog #your-channel
    ```

    **Option 2: Auto-create channel**

    ```bash theme={null}
    ~setlog
    ```
  </Step>

  <Step title="Verify Permissions">
    Ensure the bot has the following permissions in the log channel:

    * View Channel
    * Send Messages
    * Embed Links
    * Attach Files

    <Warning>
      Without proper permissions, logs cannot be sent to the channel.
    </Warning>
  </Step>

  <Step title="Confirm Configuration">
    Check that the log channel is set correctly:

    ```bash theme={null}
    ~setlog
    ```

    You should see your configured channel in the status display.
  </Step>

  <Step title="Monitor Logs">
    Watch for antinuke events in your log channel. Test by triggering a protection or making a configuration change.
  </Step>
</Steps>

***

## Channel Requirements

For a channel to function as an antinuke log channel, it must meet these requirements:

<CardGroup cols={2}>
  <Card title="Text-Based" icon="message">
    Must be a text channel or announcement channel
  </Card>

  <Card title="Bot Access" icon="robot">
    Bot must have view and send message permissions
  </Card>

  <Card title="Embed Permissions" icon="image">
    Bot needs permission to send embeds and attachments
  </Card>

  <Card title="Stable Channel" icon="lock">
    Should not be deleted or frequently modified
  </Card>
</CardGroup>

***

## Log Format

All antinuke events are logged as detailed embeds showing exactly what happened and who made the change:

<Tabs>
  <Tab title="Setting Updates">
    **Antinuke setting updated**

    Shows configuration changes like log channel setup:

    * **Setting:** What was changed (e.g., log channel)
    * **Value:** New value (e.g., #an-logs)
    * **Changed By:** User who made the change
    * **Server:** Server name and timestamp
  </Tab>

  <Tab title="Admin Changes">
    **Antinuke Admin Updated**

    Logs administrator additions and removals:

    * **Action:** Added or Removed
    * **Target:** User affected (with ID)
    * **Changed By:** User who made the change
    * **Server:** Server name and timestamp
  </Tab>

  <Tab title="Protection Changes">
    **Antinuke protection changed**

    Records protection module configuration:

    * **Protection:** Which protection (e.g., banProtection)
    * **Status:** enabled or disabled
    * **Punishment:** Punishment type (ban, kick, strip)
    * **Changed By:** User who made the change
    * **Server:** Server name and timestamp
  </Tab>

  <Tab title="Punishment Updates">
    **Antinuke setting updated**

    Tracks punishment type modifications:

    * **Setting:** Protection punishment changed (e.g., banProtection punishment)
    * **Value:** New punishment type (strip, ban, kick)
    * **Changed By:** User who made the change
    * **Server:** Server name and timestamp
  </Tab>

  <Tab title="Protection Triggers">
    **Antinuke punishment log**

    Shows when protections are triggered:

    * **Action:** What happened (e.g., Role Updated)
    * **Actor:** Who triggered the protection
    * **Target:** Who was affected
    * **Channel:** Where it occurred (if applicable)
    * **Punishment:** Action taken (strip, ban, kick)
    * **Server:** Server name and timestamp
  </Tab>
</Tabs>

***

## Common Use Cases

<AccordionGroup>
  <Accordion title="Initial Setup with Auto-Creation" icon="wand-magic-sparkles">
    ```bash theme={null}
    ~setlog
    ```

    Let Celestia automatically create a secure, properly configured log channel for you. This is the fastest setup method.
  </Accordion>

  <Accordion title="Using Existing Moderation Logs" icon="folder-open">
    ```bash theme={null}
    ~setlog #mod-logs
    ~setlog #security
    ~setlog #admin-logs
    ```

    Integrate antinuke logs with your existing moderation or security logging channel.
  </Accordion>

  <Accordion title="Checking Current Configuration" icon="clipboard-list">
    ```bash theme={null}
    ~setlog
    ```

    View your current log channel and get setup instructions if not configured.
  </Accordion>

  <Accordion title="Switching Log Channels" icon="arrows-rotate">
    ```bash theme={null}
    # Switch to a different channel
    ~setlog #new-security-logs
    ```

    Change your log channel destination when reorganizing your server structure.
  </Accordion>

  <Accordion title="Private Security Monitoring" icon="eye-slash">
    ```bash theme={null}
    ~setlog
    ```

    Auto-created channels are hidden from @everyone, perfect for private security monitoring visible only to admins.
  </Accordion>
</AccordionGroup>

## Best Practices

<Steps>
  <Step title="Set Up Logs Early">
    Configure your log channel as soon as you set up antinuke protections.

    ```bash theme={null}
    ~setlog
    ```

    <Tip>
      Early setup ensures you don't miss any security events during your server's protection period.
    </Tip>
  </Step>

  <Step title="Keep Channel Private">
    Ensure only trusted staff can view the log channel to prevent information leaks.

    **Recommended Permissions:**

    * @everyone: No access
    * Moderators: View only
    * Admins: View and manage
  </Step>

  <Step title="Regular Monitoring">
    Check your log channel regularly for activity and configuration changes.

    ```bash theme={null}
    # Quick check of log channel status
    ~setlog
    ```

    **Monitor for:**

    * System enable/disable events
    * Protection configuration changes
    * Administrator additions or removals
    * Unexpected punishment modifications
    * Protection trigger patterns
  </Step>

  <Step title="Archive Old Logs">
    Consider periodically archiving old logs to keep the channel manageable while maintaining records.

    <Note>
      Discord has built-in message search that works well for recent logs, but consider exporting older logs for long-term storage.
    </Note>
  </Step>

  <Step title="Verify Bot Permissions">
    Regularly check that the bot still has proper permissions in the log channel.

    **Required Permissions:**

    * View Channel ✓
    * Send Messages ✓
    * Embed Links ✓
    * Attach Files ✓
  </Step>
</Steps>

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Logs not appearing in channel" icon="eye-slash">
    **Problem:** No logs are being sent to the configured channel

    **Solutions:**

    1. Verify bot permissions: View Channel, Send Messages, Embed Links
    2. Check if the channel still exists and wasn't deleted
    3. Confirm log channel is properly set: `~setlog`
    4. Try setting the channel again: `~setlog #your-channel`

    <Warning>
      If the log channel is deleted, you must set a new one for logs to resume.
    </Warning>
  </Accordion>

  <Accordion title="Cannot set log channel" icon="ban">
    **Problem:** Command fails when trying to set log channel

    **Possible Causes:**

    * You lack required permissions (not owner/antinuke admin)
    * Bot lacks "Manage Channels" permission for auto-creation
    * Channel mentioned is not a text channel

    **Solution:**
    Check your permissions with `~setlog` and ensure you're mentioning a valid text channel.
  </Accordion>

  <Accordion title="Auto-creation fails" icon="triangle-exclamation">
    **Problem:** Bot cannot create Celestia-logs channel

    **Cause:** Bot lacks "Manage Channels" permission

    **Solution:**

    1. Grant bot "Manage Channels" permission
    2. Or manually create a channel and set it: `~setlog #manual-logs`

    <Note>
      Check the bot's role in Server Settings → Roles and ensure "Manage Channels" is enabled.
    </Note>
  </Accordion>

  <Accordion title="Channel already exists message" icon="copy">
    **Problem:** "Celestia-logs already exists" but it's not set

    **Solution:**
    The bot found an existing Celestia-logs channel. It will automatically set that channel as your log channel. Check with `~setlog` to confirm.
  </Accordion>

  <Accordion title="Wrong channel type error" icon="xmark">
    **Problem:** "Channel must be a text channel" error

    **Cause:** You mentioned a voice channel, category, or forum channel

    **Solution:**
    Only mention text channels or announcement channels:

    ```bash theme={null}
    ~setlog #text-channel
    ```
  </Accordion>

  <Accordion title="No changes made" icon="circle-info">
    **Problem:** Command says "No changes made"

    **Explanation:**
    The channel you specified is already set as your log channel. This is informational, not an error.

    **Verify:**

    ```bash theme={null}
    ~setlog
    ```
  </Accordion>

  <Accordion title="Permission denied" icon="lock">
    **Problem:** Cannot execute setlog command

    **Cause:** You're not the server owner or an antinuke administrator

    **Solution:**
    Ask the server owner to either:

    * Set the log channel themselves
    * Add you as an antinuke administrator: `~antinukeadmin @you`
  </Accordion>
</AccordionGroup>

***

## Security Considerations

<Warning>
  **Log Channel Privacy**

  * Log channels contain sensitive security information
  * Exposed logs can reveal your protection configuration to attackers
  * Keep log channels private and accessible only to trusted staff
  * Regularly audit who has access to view logs
  * Consider a separate private channel from general mod logs
</Warning>

<Info>
  **What Logs Reveal**

  Antinuke logs contain valuable information about:

  * Your server's protection configuration
  * System enable/disable states
  * Punishment types configured
  * Administrator changes
  * Protection activity patterns

  This information should be protected to maintain security effectiveness.
</Info>

## Integration Examples

<AccordionGroup>
  <Accordion title="Centralized Security Hub" icon="building-shield">
    Create a dedicated security category with your log channel:

    ```
    Security Hub
      ├── security-logs (setlog here)
      ├── antinuke-config
      └── security-team
    ```

    ```bash theme={null}
    ~setlog #security-logs
    ```
  </Accordion>

  <Accordion title="Multi-Bot Logging" icon="robot">
    Use the same channel for multiple security bots:

    ```bash theme={null}
    # Celestia antinuke logs
    ~setlog #all-security-logs

    # Other bots' logs can also go here
    # Wick, Beemo, etc.
    ```

    Centralize all security events in one monitored location.
  </Accordion>

  <Accordion title="Tiered Logging System" icon="layer-group">
    Set up different log channels for different severity levels:

    ```
    📝 minor-events (warnings, config changes)
    📋 moderate-events (protection triggers)
    🚨 critical-events (raids, mass violations)
    ```

    Use Celestia for critical antinuke events:

    ```bash theme={null}
    ~setlog #critical-events
    ```
  </Accordion>
</AccordionGroup>

***

## Aliases

The setlog command has convenient aliases for faster usage:

<CardGroup cols={3}>
  <Card title="anlog" icon="scroll">
    Main alias
  </Card>

  <Card title="logset" icon="gear">
    Alternative alias
  </Card>

  <Card title="setlog" icon="wrench">
    Primary command
  </Card>
</CardGroup>

***

## Related Features

<CardGroup cols={2}>
  <Card title="Antinuke Administrators" icon="user-shield" href="/antinuke-administrators">
    Learn about who can configure log channels and manage antinuke settings
  </Card>

  <Card title="Protection Modules" icon="shield-halved" href="/protection-modules">
    Explore what protection events get logged to your channel
  </Card>

  <Card title="Whitelist System" icon="shield-check" href="/whitelist">
    Configure which users are exempt from protections (logged events)
  </Card>

  <Card title="Audit System" icon="magnifying-glass" href="/audit-system">
    Review historical logs and security patterns
  </Card>
</CardGroup>

***

## Quick Reference

<Tabs>
  <Tab title="Setup Commands">
    ```bash theme={null}
    # Auto-create log channel
    ~setlog

    # Use specific channel
    ~setlog #security-logs

    # Check current status
    ~setlog

    # Using aliases
    ~anlog #logs
    ~logset
    ```
  </Tab>

  <Tab title="Requirements">
    **Bot Permissions:**

    * Manage Channels (for auto-creation)
    * View Channel
    * Send Messages
    * Embed Links
    * Attach Files

    **User Permissions:**

    * Server Owner
    * Extra Owner
    * Antinuke Administrator
  </Tab>

  <Tab title="Best Practices">
    ✅ Set up logs early
    ✅ Keep channel private
    ✅ Monitor regularly
    ✅ Archive old logs
    ✅ Verify bot permissions

    ❌ Don't make logs public
    ❌ Don't delete log channel
    ❌ Don't remove bot access
  </Tab>
</Tabs>
