Skip to content

Wiki System Configuration Guide

Overview

The Wiki System in MineBot provides an accessible knowledge base within your Discord server. This feature enables:

  • In-Discord documentation for server rules, guides, and information
  • Multi-language support with locale-specific content
  • Quick access through slash commands with autocomplete
  • Embedded responses for clean, formatted information

Configuration Structure

The Wiki system is configured in the settings.json file under the commands.wiki section:

json
"wiki": {
  "permissions": ["NONE"],
  "cooldown": {
    "algorithm": "fixed_window",
    "bucket": "user",
    "window_length": 60,
    "allowed_invocations": 1
  }
}

Configuration Options

OptionDescriptionExampleNotes
permissionsRequired Discord permissions["NONE"]Use "NONE" for all users
cooldownRate limiting for command usageSee configurationPrevents abuse of the wiki command

Cooldown Configuration

OptionDescriptionDefaultNotes
algorithmMethod for tracking cooldowns"fixed_window"Options: fixed_window, sliding_window
bucketScope of the cooldown"user"Options: user, channel, guild, global
window_lengthDuration of cooldown in seconds60Adjust based on usage patterns
allowed_invocationsNumber of uses allowed per window1Balances accessibility with limits

File Structure

Wiki content is organized in markdown files within the following directory structure:

configuration/
└── wiki/
    ├── en-US/        # English content
    │   ├── rules.md
    │   └── faq.md
    ├── tr/        # Turkish content
    │   ├── kurallar.md
    │   └── sss.md
    └── [locale]/     # Other language folders

Wiki File Format

Each wiki file should be formatted as a markdown document with proper formatting:

markdown
---
__Documentation Title__

- __[Useful Link](https://example.com)__ - Description of the link
---

### Section Header

Content goes here with standard markdown formatting.

## Larger Section Header

More content with **bold**, _italic_, or `code` formatting.

Localization

Wiki messages are automatically localized through language files. Example from en-US.json:

json
"wiki": {
  "command": {
    "label": "wiki",
    "description": "Get information from the wiki.",
    "options": {
      "query": {
        "label": "query",
        "description": "The query to search for."
      }
    }
  },
  "messages": {
    "user": {
      "success": {
        "message_type": "embed",
        "content": {
          "title": "{query} - Wiki Search Result",
          "description": "{result}",
          "color": "BLUE"
        }
      },
      "failure": {
        "message_type": "embed",
        "content": {
          "title": "Wiki Search Failed",
          "description": "Failed to retrieve the wiki information. Please try again later.",
          "color": "RED"
        }
      }
    }
  }
}

Usage Instructions

Adding Wiki Content

  1. Create markdown files in the appropriate locale folder
  2. Name files descriptively (e.g., commands.md, rules.md)
  3. Use proper markdown formatting for clean display

Accessing Wiki Content

Users can access wiki content using the slash command:

  • Type /wiki to start
  • Use autocomplete to find available articles
  • Select an article to view its contents

Example Configurations

Basic Setup

json
"wiki": {
  "permissions": ["NONE"],
  "cooldown": {
    "algorithm": "fixed_window",
    "bucket": "user",
    "window_length": 30,
    "allowed_invocations": 3
  }
}

Moderator-Only Wiki

json
"wiki": {
  "permissions": ["MODERATE_MEMBERS"],
  "cooldown": {
    "algorithm": "fixed_window",
    "bucket": "user",
    "window_length": 10,
    "allowed_invocations": 5
  }
}