docs: Update docs for the correctness (#13)
This commit is contained in:
1 parent
8dba55272c
commit
51a783f93a
60 files changed
+2456
-380
No files matched your search
+3
-2
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Conversational AI Integration
|
||||
weight: 2
|
||||
weight: 4
|
||||
---
|
||||
|
||||
**Goal:** Integrate Large Language Models (LLMs) while managing context and Discord's timeout constraints.
|
||||
@@ -51,5 +51,6 @@ export async function execute(interaction, controller) {
|
||||
}
|
||||
```
|
||||
|
||||
> [!WARNING] > **API Costs:**
|
||||
> [!WARNING]
|
||||
> **API Costs:**
|
||||
> AI APIs are often billed by token. Implement strict user-based rate limits in your Controller to prevent abuse.
|
||||
@@ -65,7 +65,8 @@ Once running, use these mechanisms to check health:
|
||||
- **`/ping` Command:** Verifies network latency and API responsiveness.
|
||||
- **`/modules` Command:** Lists all loaded modules to confirm feature availability.
|
||||
|
||||
> [!WARNING] > **Scaling Constraint:**
|
||||
> [!WARNING]
|
||||
> **Scaling Constraint:**
|
||||
> Quetza follows a single-instance-per-token model. Do not run multiple instances with the same token, as this will cause WebSocket conflicts.
|
||||
|
||||
---
|
||||
|
||||
+3
-2
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Interactive Voice Features
|
||||
weight: 1
|
||||
weight: 3
|
||||
---
|
||||
|
||||
**Goal:** Implement sophisticated voice interactions that respect guild boundaries and manage ephemeral resources.
|
||||
@@ -32,7 +32,8 @@ Audio sessions are ephemeral.
|
||||
- **Transient State:** Active audio stream (Lost on disconnect).
|
||||
- **Durable State:** Queue/Playlist (Persisted in Controller until restart).
|
||||
|
||||
> [!TIP] > **Resilience:** Separate the _Queue_ logic from the _Voice Connection_ logic. This allows the bot to reconnect without losing the user's playlist.
|
||||
> [!TIP]
|
||||
> **Resilience:** Separate the _Queue_ logic from the _Voice Connection_ logic. This allows the bot to reconnect without losing the user's playlist.
|
||||
|
||||
## 4. Implementation Sketch
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
---
|
||||
title: Recipes
|
||||
weight: 3
|
||||
---
|
||||
|
||||
**Quetza** recipes are strategic architectural patterns for common functional requirements. They focus on _how_ to compose framework features to solve business problems.
|
||||
|
||||
## Recipe Categories
|
||||
|
||||
{{% cards %}}
|
||||
{{< card link="voice-features" title="Interactive Voice Features" icon="users" subtitle="Managing audio players and guild-scoped state." >}}
|
||||
{{< card link="conversational-ai" title="Conversational AI" icon="chip" subtitle="Handling LLM context and long-running responses." >}}
|
||||
{{% /cards %}}
|
||||
@@ -22,18 +22,15 @@ weight: 1
|
||||
|
||||
**Symptom:** `/command` does not appear in Discord.
|
||||
|
||||
### Global vs. Guild Registration
|
||||
### Global vs. Test Guild Registration
|
||||
|
||||
- **Global:** Takes up to 1 hour to propagate.
|
||||
- **Guild:** Instant update.
|
||||
- **Fix:** Set `DEV_GUILD_ID` in your `.env` for development.
|
||||
- **Global:** Commands pushed to the application globally can take up to 1 hour to propagate and are subject to stricter rate limits.
|
||||
- **Test Guild:** Quetza automatically pushes commands to a specific guild in development mode for instant updates.
|
||||
- **Requirement:** Ensure `NODE_ENV=development` and `DEV_GUILD_ID` is correctly set in your `.env`.
|
||||
|
||||
### Data Malformation
|
||||
### Rate Limits
|
||||
|
||||
Discord rejects invalid command structures silently or with generic errors.
|
||||
|
||||
- **Name:** Must be lowercase, alphanumeric, `-` only.
|
||||
- **Description:** Required, max 100 chars.
|
||||
Frequent updates to global commands may trigger Discord's rate limits. Use a test guild for iterative development.
|
||||
|
||||
## 3. Interaction Failures
|
||||
|
||||
@@ -71,5 +68,6 @@ Check your Controller.
|
||||
- **Multiple:** Events are additive. Did you register the same handler in two modules?
|
||||
- **None:** Did you export `name` and `execute` correctly?
|
||||
|
||||
> [!TIP] > **Debug Mode:**
|
||||
> [!TIP]
|
||||
> **Debug Mode:**
|
||||
> Enable verbose logging to see exactly which modules and commands are loaded at startup.
|
||||
Reference in new issue
Block a user