Skip to content

base

Base setup service providing standardized patterns for bot initialization.

Classes:

  • BaseSetupService

    Base class for all setup services with standardized patterns.

  • BotSetupService

    Base class for setup services that need bot access.

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.

Functions