""" commands package ================ Discord bot commands for the ComfyUI bot. This package contains all command handlers organized by functionality: - generation: Image/video generation commands (generate, workflow-gen, rerun, cancel) - workflow: Workflow management commands - upload: Image upload commands - history: History viewing and retrieval commands - workflow_changes: Runtime workflow parameter management (prompt, seed, etc.) - utility: Quality-of-life commands (ping, status, comfy-stats, comfy-queue, uptime) - presets: Named workflow preset management """ from __future__ import annotations from config import BotConfig from .generation import setup_generation_commands from .input_images import setup_input_image_commands from .server import setup_server_commands from .workflow import setup_workflow_commands from .history import setup_history_commands from .workflow_changes import setup_workflow_changes_commands from .utility import setup_utility_commands from .presets import setup_preset_commands from .help_command import CustomHelpCommand def register_all_commands(bot, config: BotConfig): """ Register all bot commands. This function should be called once during bot initialization to set up all command handlers. Parameters ---------- bot : commands.Bot The Discord bot instance. config : BotConfig The bot configuration object containing environment settings. """ setup_generation_commands(bot, config) setup_input_image_commands(bot, config) setup_server_commands(bot, config) setup_workflow_commands(bot) setup_history_commands(bot) setup_workflow_changes_commands(bot) setup_utility_commands(bot) setup_preset_commands(bot) __all__ = [ "register_all_commands", "setup_generation_commands", "setup_input_image_commands", "setup_workflow_commands", "setup_history_commands", "setup_workflow_changes_commands", "setup_utility_commands", "setup_preset_commands", "CustomHelpCommand", ]