Components
Commands
Learn about the command system in ShadowCore and how it works.
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: