# Quests System

## Quest System Guide

The Quest System allows server administrators and authorized members to create engaging challenges for your community. Participants can join quests, submit their entries, and compete for prizes!

### 📋 Table of Contents

* Quest Administration
* Getting Started
* Quest Commands Overview
* Creating Quests
* Managing Quests
* Viewing Quest Information
* Advanced Features
* Permission Requirements
* Tips & Best Practices

***

### ⚙️ Quest Administration

Before using the quest system, server administrators need to set up who can manage quests. Quest administration commands can only be used by server administrators.

#### `/quest-admin add-role`

Grant quest management permissions to a specific role.

**Required Parameters:**

* **`role`** *(role mention)*
  * The role to grant quest management permissions

**Examples:**

```
/quest-admin add-role role:@Quest Manager
/quest-admin add-role role:@Event Staff
/quest-admin add-role role:@Moderators
```

**What this does:**

* Members with this role can create, edit, and manage quests
* They can access all quest management commands (except quest-admin commands)
* Multiple roles can be granted quest management permissions

***

#### `/quest-admin remove-role`

Remove quest management permissions from a role.

**Required Parameters:**

* **`role`** *(role mention)*
  * The role to remove quest management permissions from

**Examples:**

```
/quest-admin remove-role role:@Former Staff
/quest-admin remove-role role:@Temp Moderators
```

**What this does:**

* Members with this role will no longer be able to manage quests
* Only affects quest management permissions, not their other server permissions
* Active quests created by members with this role remain unaffected

***

#### `/quest-admin list-roles`

View all roles that currently have quest management permissions.

**No Parameters Required**

**Example:**

```
/quest-admin list-roles
```

**Sample Output:**

```
🔧 Quest Management Roles:
• @Quest Manager (ID: 123456789)
• @Event Staff (ID: 987654321)
• @Senior Moderators (ID: 456789123)

Total: 3 roles with quest management permissions
```

***

### 🚀 Getting Started

The quest system uses Discord's slash commands. Simply type `/quest` and select from the available subcommands.

**Basic Usage:**

```
/quest [subcommand] [options]
```

***

### 📖 Quest Commands Overview

#### Quest Administration Commands (Administrators Only)

| Command                    | Description                                      | Required Permissions |
| -------------------------- | ------------------------------------------------ | -------------------- |
| `/quest-admin add-role`    | Grant quest management permissions to a role     | Administrator        |
| `/quest-admin remove-role` | Remove quest management permissions from a role  | Administrator        |
| `/quest-admin list-roles`  | View all roles with quest management permissions | Administrator        |

#### Quest Management Commands

| Command                 | Description                    | Required Permissions           |
| ----------------------- | ------------------------------ | ------------------------------ |
| `/quest new`            | Create a new quest             | Administrator or Quest Manager |
| `/quest list`           | View all quests                | Anyone                         |
| `/quest info`           | Get detailed quest information | Anyone                         |
| `/quest participants`   | View quest participants        | Anyone                         |
| `/quest submissions`    | View quest submissions         | Administrator or Quest Manager |
| `/quest end`            | Manually end a quest           | Administrator or Quest Manager |
| `/quest edit`           | Edit an active quest           | Administrator or Quest Manager |
| `/quest select-winners` | Manually select winners        | Administrator or Quest Manager |
| `/quest remind`         | Send quest reminder            | Administrator or Quest Manager |

***

### 🎯 Creating Quests

#### `/quest new`

Create a new quest with various customization options.

**Required Parameters:**

* **`name`** *(text, max 100 characters)*
  * The quest name/title
  * Example: `"Weekly Art Contest"`
* **`description`** *(text, max 2000 characters)*
  * Quest rules and description
  * **Special Feature:** Use `id-messageId` to copy content from an existing message
  * Example: `"Create original artwork featuring our mascot"` or `"id-1234567890123456789"`
* **`duration`** *(number, 1-30 days)*
  * How long the quest will run
  * Example: `7` (for 7 days)
* **`winners`** *(number, 1-100)*
  * Number of winners to select
  * Example: `3`
* **`prize`** *(text)*
  * Prize description with specific formats:
  * **Points:** Just a number (e.g., `"50"`)
  * **Tokens:** Amount + token name (e.g., `"10 usdc"`, `"1 sol"`)
  * Example: `"100"` or `"5 usdc"`
* **`auto-selection`** *(true/false)*
  * Whether to automatically select winners when quest ends
  * `true` = Automatic winner selection
  * `false` = Manual winner selection required

**Optional Parameters:**

* **`channel`** *(channel)*
  * Channel to post the quest (defaults to current channel)
  * Select any text channel in your server
* **`role-requirement`** *(role)*
  * Role required to participate
  * Only members with this role can join the quest
* **`image`** *(file attachment)*
  * Upload an image file for the quest
  * **Supported formats:** JPG, PNG, GIF, WebP
  * **Maximum size:** 8MB
  * **Note:** You can directly upload files instead of providing URLs!

**Example Usage:**

```
/quest new 
  name: Weekly Art Contest
  description: Create original artwork featuring our server mascot. All submissions must be original work.
  duration: 7
  winners: 3
  prize: 100
  auto-selection: true
  channel: #contests
  role-requirement: @Artist
  image: [Upload your contest banner image]
```

***

### 🔧 Managing Quests

#### `/quest end`

Manually end an active quest before its scheduled end time.

**Parameters:**

* **`quest-name`** *(optional text)*
  * Name of quest to end (supports partial matching)
  * If not provided, shows a list to choose from

**Example:**

```
/quest end quest-name: Weekly Art
```

#### `/quest edit`

Edit details of an active quest.

**Parameters:**

* **`quest-name`** *(optional text)*
  * Name of quest to edit (supports partial matching)
  * Opens an interactive editing interface

**Example:**

```
/quest edit quest-name: Weekly Art
```

#### `/quest select-winners`

Manually select winners for a completed quest.

**Parameters:**

* **`quest-name`** *(optional text)*
  * Name of quest (supports partial matching)
  * Opens winner selection interface

**Example:**

```
/quest select-winners quest-name: Weekly Art
```

#### `/quest remind`

Send a reminder message for an active quest.

**Parameters:**

* **`quest-name`** *(optional text)*
  * Name of quest (supports partial matching)
* **`message`** *(optional text, max 500 characters)*
  * Custom reminder message
  * If not provided, uses default reminder

**Example:**

```
/quest remind 
  quest-name: Weekly Art
  message: Only 2 days left to submit your artwork!
```

***

### 📊 Viewing Quest Information

#### `/quest list`

View all quests in the server.

**Parameters:**

* **`status`** *(optional choice)*
  * Filter quests by status:
    * `Active` - Currently running quests
    * `Ended` - Completed quests
    * `All` - All quests (default)

**Example:**

```
/quest list status: Active
```

#### `/quest info`

Get detailed information about a specific quest.

**Parameters:**

* **`quest-name`** *(optional text)*
  * Name of quest (supports partial matching)
  * If not provided, shows a list to choose from

**Example:**

```
/quest info quest-name: Weekly Art
```

#### `/quest participants`

View all participants for a quest.

**Parameters:**

* **`quest-name`** *(optional text)*
  * Name of quest (supports partial matching)

**Example:**

```
/quest participants quest-name: Weekly Art
```

#### `/quest submissions`

View all submissions for a quest (Admin/Manager only).

**Parameters:**

* **`quest-name`** *(optional text)*
  * Name of quest (supports partial matching)
* **`export-csv`** *(optional true/false)*
  * Export submissions as CSV file
  * Useful for external analysis or record keeping

**Example:**

```
/quest submissions 
  quest-name: Weekly Art
  export-csv: true
```

***

### ⚡ Advanced Features

#### 📝 Message ID References

When creating a quest description, you can reference existing messages to copy their content:

**Format:** `id-messageId`

**Example:** `id-1234567890123456789`

**How to get a message ID:**

1. Enable Developer Mode in Discord settings
2. Right-click on any message
3. Select "Copy Message ID"
4. Use the ID in the format above

**What gets copied:**

* Message text content
* Embed titles and descriptions
* Embed field names and values
* Automatically limits to 4000 characters

#### 🖼️ Direct Image Uploads

Instead of providing image URLs, you can directly upload image files:

**Supported formats:** JPG, JPEG, PNG, GIF, WebP**Maximum size:** 8MB**Benefits:**

* No need for external image hosting
* Automatic Discord CDN hosting
* Built-in file validation

#### 🎲 Automatic vs Manual Winner Selection

* **Automatic:** Winners are randomly selected when the quest ends
* **Manual:** Administrators can review submissions and manually select winners

***

### 🔐 Permission Requirements

#### Administrator Access

Server administrators have full access to the quest system:

* Can use all quest commands
* Can use all quest-admin commands to manage who can create quests
* Can create, edit, and manage any quest
* Can grant/remove quest management permissions to/from roles

#### Quest Manager Role

Members with quest management roles have most quest permissions:

* Can create and manage quests
* Can use quest creation, editing, and management commands
* **Cannot** use quest-admin commands (cannot manage who has quest permissions)
* Must be granted permissions by administrators using `/quest-admin add-role`

#### Regular Members

Standard server members have limited quest access:

* Can view quests (`/quest list`, `/quest info`, `/quest participants`)
* Can participate in quests (through the bot's participation system)
* Cannot create or manage quests
* Cannot view quest submissions or use administrative commands

***

### 💡 Tips & Best Practices

#### Creating Effective Quests

1. **Clear Instructions:** Write detailed, easy-to-understand quest descriptions
2. **Appropriate Duration:** Consider your community's activity level
   * Art contests: 5-7 days
   * Writing challenges: 3-5 days
   * Simple tasks: 1-3 days
3. **Fair Prizes:** Ensure prizes match the effort required
4. **Role Requirements:** Use role requirements to target specific community segments

#### Managing Submissions

1. **Review Regularly:** Check submissions periodically during active quests
2. **CSV Export:** Use the CSV export feature for large contests to analyze submissions externally
3. **Winner Selection:** For creative contests, consider manual winner selection for fairness

#### Community Engagement

1. **Reminders:** Send reminder messages 1-2 days before quest ends
2. **Announcements:** Post quest announcements in relevant channels
3. **Feedback:** Ask for community feedback on quest types and prizes

#### Technical Considerations

1. **Image Uploads:** Use direct file uploads instead of URLs when possible
2. **Message References:** Use message ID references to maintain consistent formatting across quests
3. **Channel Selection:** Post quests in appropriate, well-monitored channels

***

### 🆘 Troubleshooting

#### Common Issues

**"Permission Denied" Error:**

* Ensure you have Administrator permissions or a Quest Manager role
* Contact server administrators for role assignment

**Quest Not Appearing:**

* Check if the quest was posted in the correct channel
* Verify the quest wasn't automatically ended due to an error

**Image Upload Failed:**

* Check file size (must be under 8MB)
* Ensure file format is supported (JPG, PNG, GIF, WebP)
* Try a different image file

**Message ID Reference Not Working:**

* Verify the message ID is correct (should be 17-19 digits)
* Ensure the message exists in the specified channel
* Check that the bot has permission to read the referenced message

#### Getting Help

* Contact server administrators
* Join the support server: \[Discord Link]
* Check the documentation: \[Documentation Link]

***

### 📋 Quick Reference

#### Prize Format Examples

```
Points: "50", "100", "250"
USDC: "10 usdc", "25 usdc", "100 usdc"
SOL: "1 sol", "0.5 sol", "2 sol"
```

#### Duration Guidelines

```
Quick Tasks: 1-2 days
Standard Contests: 3-7 days
Major Events: 7-14 days
Monthly Challenges: 30 days (maximum)
```

#### Common Quest Types

* Art and design contests
* Writing challenges
* Photo competitions
* Community engagement tasks
* Knowledge quizzes
* Creative challenges

***

*This guide covers all quest system features. For additional support, contact your server administrators or join our support community.*


---

# 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.tektools.app/product-guides/configuring-in-discord/quests-system.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.
