Skip to content

logs

Log channel configuration management using unified dashboard.

Classes:

  • LogManager

    Management commands for log channel configuration using unified dashboard.

Classes

LogManager

Python
LogManager(bot: Tux)

Bases: BaseConfigManager

Management commands for log channel configuration using unified dashboard.

Initialize the manager with a bot instance.

Parameters:

  • bot (Tux) –

    The bot instance to use for database operations.

Methods:

Functions

configure_logs async
Python
configure_logs(ctx: Context[Tux]) -> None

Configure log channel assignments using the unified config dashboard.

This command launches the unified configuration dashboard in logs mode to allow administrators to assign text channels for various bot logging purposes.

Parameters:

  • ctx (Context[Tux]) –

    The context of the command invocation.

configure_dashboard async
Python
configure_dashboard(
    ctx: Context[Tux], mode: str, description: str | None = None
) -> None

Open the unified config dashboard in a specific mode.

Parameters:

  • ctx (Context[Tux]) –

    The context of the command invocation.

  • mode (str) –

    The dashboard mode to open (e.g., "ranks", "roles", "commands", "logs").

  • description (str | None, default: None ) –

    Optional description for the dashboard mode.

create_error_embed
Python
create_error_embed(title: str, description: str) -> Embed

Create a standardized error embed.

Parameters:

  • title (str) –

    Error title.

  • description (str) –

    Error description.

Returns:

  • Embed

    Formatted error embed.

create_success_embed
Python
create_success_embed(title: str, description: str) -> Embed

Create a standardized success embed.

Parameters:

  • title (str) –

    Success title.

  • description (str) –

    Success description.

Returns:

  • Embed

    Formatted success embed.

create_warning_embed
Python
create_warning_embed(title: str, description: str) -> Embed

Create a standardized warning embed.

Parameters:

  • title (str) –

    Warning title.

  • description (str) –

    Warning description.

Returns:

  • Embed

    Formatted warning embed.

create_info_embed
Python
create_info_embed(title: str, description: str) -> Embed

Create a standardized info embed.

Parameters:

  • title (str) –

    Info title.

  • description (str) –

    Info description.

Returns:

  • Embed

    Formatted info embed.

handle_error async
Python
handle_error(ctx: Context[Tux], error: Exception, operation: str) -> None

Handle errors consistently across managers.

Parameters:

  • ctx (Context[Tux]) –

    The context of the command invocation.

  • error (Exception) –

    The error that occurred.

  • operation (str) –

    Description of the operation that failed.