Initial commit — ComfyUI Discord bot + web UI
Full source for the-third-rev: Discord bot (discord.py), FastAPI web UI (React/TS/Vite/Tailwind), ComfyUI integration, generation history DB, preset manager, workflow inspector, and all supporting modules. Excluded from tracking: .env, invite_tokens.json, *.db (SQLite), current-workflow-changes.json, user_settings/, presets/, logs/, web-static/ (build output), frontend/node_modules/. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
64
commands/__init__.py
Normal file
64
commands/__init__.py
Normal file
@@ -0,0 +1,64 @@
|
||||
"""
|
||||
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",
|
||||
]
|
||||
Reference in New Issue
Block a user