Ricardoneud.com
DocumentationHelp Center
API Reference
  • Production
  • Sandbox (Coming Soon)
DocumentationHelp Center
API Reference
  • Production
  • Sandbox (Coming Soon)
Discord Community
Github
  1. Installation
  • Getting Started
    • Introduction
    • Firewall
  • Custom Domains
    • Introduction
    • API
  • SDK
    • Javascript
    • PHP
    • Python
  • Products
    • Next.js Docs Template
      • Installation
        • VPS Installation
        • Pterodactyl Installation
    • Game Panels
      • Pterodactyl
        • Eggs
          • Installation
            • Next.js Egg
        • Extensions
          • Installation
            • Pterodactyl Livechat
      • Pelican
        • Eggs
          • Installation
            • Next.js Egg
    • Donate Me
      • Installation
        • VPS Installation
        • Pterodactyl Installation
    • LicenseForge
      • Installation
        • VPS Installation
        • Webhost Installation
      • API
        • Check License
    • Billing Portals
      • WHMCS
        • Extensions
          • Installation
            • Ticket Spam Checker
            • Chatwoot Livechat
    • ProbeCore
      • Introduction
      • Self Hosting
        • Installation
          • VPS Installation
          • Pterodactyl Installation
    • Other
      • Drako Bot
        • Addons
          • Installation
            • SmartResponse Addon
  1. Installation

SmartResponse Addon

Overview#

The SmartResponse Addon for Drako Bot is a modular, AI-driven response system designed for Discord servers. It supports multiple AI providers, handles multi-step interactions, and integrates seamlessly with internal knowledge bases for context-aware responses. The system is built with extensibility in mind, allowing developers to add new AI providers or customize bot behavior without modifying core logic.

Features#

Automatic Node.js module management Missing modules are detected and installed on first run.
Multi-provider AI support via Vercel AI SDK Supports OpenAI, Groq, Mistral, and easily extendable to other providers.
Multi-step response handling with interactive Discord buttons.
Internal knowledge base integration for enhanced context-aware replies.
Advanced message matching using semantic similarity and stemmed matching.
Discord modal and button interactions for user-friendly input.
Conversation caching with automatic timeout management.
Modular and maintainable architecture for easier future extensions.
Note: Auto-installation occurs for missing modules, ensuring smooth first-time setup.

Configuration#

All bot settings are defined in config.yml.

SmartResponses#

Configure default AI behavior and internal data sources:

AI Providers#

Define API keys, models, and response settings:

Phrases#

Define triggers and responses:

Adding New AI Providers#

The modular architecture makes it straightforward to add new AI providers. The following guide outlines the required steps.

Step 1: Install Provider SDK#

Install the official SDK for your AI provider:

Step 2: Create Provider Module#

Create a new file in providers/, e.g., anthropic.js:

Step 3: Update Providers Index#

Include the new provider in providers/index.js:

Step 4: Update SmartResponse Logic#

Modify SmartResponse.generateAIResponse to handle the new provider:

Step 5: Configure Provider in YAML#

Add the new provider configuration in config.yml:

Step 6: Test Your Provider#

Restart the bot and confirm the new provider works.
Send a test message in a whitelisted channel.
Ensure the AI responds as expected.

Usage#

Bot Interaction#

The bot listens to messages in whitelisted channels and categories.
If RequireMention is enabled, mention the bot to trigger a response.
Multi-step responses use Discord buttons:
Show Next Step: Proceed to the next message in a sequence.
Ask Another Question: Opens a modal for new input.

Internal Knowledge Base#

Place your reference documents in resources/docs/, resources/wiki/, or resources/knowledge_base/.
The bot automatically indexes and retrieves context from these sources.

Conversation Cache#

Responses are cached to improve performance.
Cache timeout ensures memory is not consumed indefinitely.

Automatic Module Management#

The bot verifies required modules on runtime:
Logs missing dependencies.
Installs them automatically via npm install.
Continues execution after installation.
Auto-installed modules:
natural, fs, path, js-yaml, discord.js,
@ai-sdk/openai, @ai-sdk/groq, @ai-sdk/mistral, ai

Credits#

John – Owner of Drako Bot and original creator of SmartResponse.
Modified at 2025-10-23 17:49:25
Previous
Pterodactyl Installation
Built with