Skip to main content

Commands Component

The Commands Component in ShadowCore provides a structured way to define, manage, and execute commands within your Discord bot. This system ensures modularity, scalability, and ease of use.

๐Ÿ›  Overview

ShadowCoreโ€™s command system automatically loads and organizes commands from designated directories. Each command is defined in its own file, following a standardized structure.

Key Features:

  • Automatic Command Registration: Commands are dynamically loaded from folders.
  • Built-in Argument Parsing: Supports extracting arguments from user input.
  • Permissions & Cooldowns: Restrict commands based on roles and enforce rate limits.
  • Middleware Support: Pre/post-execution middleware for additional logic.

๐Ÿ“‚ Command Structure

Commands in ShadowCore are organized within the /commands directory and categorized into subfolders. Example Folder Structure:
Each command file must export a command object containing its configuration and execution logic.

๐Ÿ”ง Command Object Structure

A command in ShadowCore follows this basic structure: