Skip to content

setup

Setup services for bot initialization.

Modules:

  • base

    Base setup service providing standardized patterns for bot initialization.

  • cog_setup

    Cog setup service for bot initialization.

  • database_setup

    Database setup service for bot initialization.

  • orchestrator

    Bot setup orchestrator that coordinates all setup services.

  • permission_setup

    Permission system setup service for bot initialization.

Classes:

Classes

BaseSetupService

Python
BaseSetupService(name: str)

Bases: ABC

Base class for all setup services with standardized patterns.

Initialize the base setup service.

Parameters:

  • name (str) –

    The name of the setup service for logging and tracing.

Methods:

  • setup

    Execute the setup process. Must be implemented by subclasses.

  • safe_setup

    Execute setup with standardized error handling and tracing.

Functions

setup abstractmethod async
Python
setup() -> None

Execute the setup process. Must be implemented by subclasses.

safe_setup async
Python
safe_setup() -> bool

Execute setup with standardized error handling and tracing.

Returns:

  • True if setup succeeded, False if it failed
_log_step
Python
_log_step(step: str, status: str = 'info') -> None

Log a setup step with consistent formatting.

BotSetupService

Python
BotSetupService(bot: Tux, name: str)

Bases: BaseSetupService

Base class for setup services that need bot access.

Initialize the bot setup service.

Parameters:

  • bot (Tux) –

    The Discord bot instance to set up.

  • name (str) –

    The name of the setup service for logging and tracing.

Methods:

  • setup

    Execute the setup process. Must be implemented by subclasses.

  • safe_setup

    Execute setup with standardized error handling and tracing.

Functions

setup abstractmethod async
Python
setup() -> None

Execute the setup process. Must be implemented by subclasses.

safe_setup async
Python
safe_setup() -> bool

Execute setup with standardized error handling and tracing.

Returns:

  • True if setup succeeded, False if it failed
_log_step
Python
_log_step(step: str, status: str = 'info') -> None

Log a setup step with consistent formatting.

BotSetupOrchestrator

Python
BotSetupOrchestrator(bot: Tux)

Orchestrates the bot setup process using specialized setup services.

Initialize the bot setup orchestrator.

Parameters:

  • bot (Tux) –

    The Discord bot instance to set up.

Methods:

  • setup

    Execute all setup steps with standardized error handling.

Functions

setup async
Python
setup(span: DummySpan | Any) -> None

Execute all setup steps with standardized error handling.

Raises:

_setup_prefix_manager async
Python
_setup_prefix_manager(span: DummySpan | Any) -> None

Set up the prefix manager.