# Module

{% hint style="warning" %}
**Important:** You must be on an Elite Plan with a whitelisted game and a valid API Key.
{% endhint %}

### **Setup Instructions**

#### 1. Insert the Panora Module

* Insert a Script into `ServerScriptService` in Roblox Studio.
* Rename it to `PanoraAPI`.
* Paste the following line to load the module:

```lua
local PanoraModule = require(75504929725269) -- DO NOT CHANGE
```

***

#### 2. Initialize the Module

```lua
local panoraInstance = PanoraModule.init("PANORA-YOUR-API-KEY-HERE", {
    GroupId = 123456789, -- 🔁 Replace with your actual Roblox Group ID

    -- In-Game Commands
    Commands = {
        Enabled = true,     -- Enables in-game :rank commands (:promote & :demote)
        MinRank = 120,      -- Minimum rank to use commands
        Prefix = ":",       -- Command prefix
    },

    -- Panora Interface
    Interface = {
        Enabled = true,     -- Shows the Panora UI for eligible players
        MinRank = 120,      -- Minimum rank to access UI
    },

    -- Ranking Logs
    RankingLogs = {
        Enabled = true,     -- Log all ranking actions to Discord
        webhookUrl = "https://discord.com/api/webhooks/your-webhook-id", -- Replace with your Discord webhook
    },

    -- Activity Tracking
    Activity = {
        Enabled = true,     -- Track player join/leave & playtime
        MinRank = 1,        -- Only track members above this rank
        Leaderstats = true, -- Show time tracked in leaderstats
        Webhook = true,     -- Send join/leave logs to Discord
        webhookUrl = "https://discord.com/api/webhooks/your-webhook-id", -- Replace with your Discord webhook
    },
})
```

***

#### Full Script (Copy & Paste if needed)

```lua
--[[ 
=======================================
📝 PANORA API MODULE
=======================================

Instructions:
1. Place this Script inside ServerScriptService.
2. Replace the placeholders with your actual API Key, Group ID, and Discord webhook URLs.
3. Only whitelisted games on your Elite Plan will work.

⚠️ Keep your API Key private!
]]

local PanoraModule = require(75504929725269) -- DO NOT CHANGE

local panoraInstance = PanoraModule.init("PANORA-YOUR-API-KEY-HERE", {
    GroupId = 123456789, -- 🔁 Replace with your actual Roblox Group ID

    -- In-Game Commands
    Commands = {
        Enabled = true,     -- Enables in-game :rank commands
        MinRank = 120,      -- Minimum rank to use commands
        Prefix = ":",       -- Command prefix
    },

    -- Panora Interface
    Interface = {
        Enabled = true,     -- Shows the Panora UI for eligible players
        MinRank = 120,      -- Minimum rank to access UI
    },

    -- Ranking Logs
    RankingLogs = {
        Enabled = true,     -- Log all ranking actions to Discord
        webhookUrl = "https://discord.com/api/webhooks/your-webhook-id", -- Replace with your Discord webhook
    },

    -- Activity Tracking
    Activity = {
        Enabled = true,     -- Track player join/leave & playtime
        MinRank = 1,        -- Only track members above this rank
        Leaderstats = true, -- Show time tracked in leaderstats
        Webhook = true,     -- Send join/leave logs to Discord
        webhookUrl = "https://discord.com/api/webhooks/your-webhook-id", -- Replace with your Discord webhook
    },
})

--[[ 
📌 Notes:
- Ensure this game is whitelisted in your Panora API settings.
- Tracks: joins, leaves, playtime in leaderstats, ranking actions.
- Adjust MinRank to restrict features for certain members.
- Keep API Key private — never share it publicly.
]]

```

***

#### 3. Test Your Integration

* Run your game in LIVE Roblox.
* Ensure:
  * No errors appear in the console output.
  * Leaderstats are updated correctly (if enabled).
  * Join/leave logs appear in Discord (if webhook enabled).

***

#### 4. Notes

* Keep your API Key private.
* Only whitelisted games can successfully use the module.
* You can enable/disable different tracking features by toggling the boolean options in the configuration table.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.panora.cc/api/activity/module.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
