Skip to content

report

Discord Report Modal for Tux Bot.

This module provides a modal dialog for users to submit anonymous reports to the server moderation team with proper logging and thread creation.

Classes:

  • ReportModal

    Modal for submitting anonymous user reports.

Classes

ReportModal

Python
ReportModal(*, title: str = 'Submit an anonymous report', bot: Tux)

Bases: Modal

Modal for submitting anonymous user reports.

Initialize the report modal.

Parameters:

  • title (str, default: 'Submit an anonymous report' ) –

    The modal title, by default "Submit an anonymous report".

  • bot (Tux) –

    The bot instance to use for database access and operations.

Raises:

  • RuntimeError

    If DatabaseService is not available via DI.

Methods:

  • on_submit

    Send the report to the moderation team.

Functions

on_submit async
Python
on_submit(interaction: Interaction) -> None

Send the report to the moderation team.

Parameters:

  • interaction (Interaction) –

    The interaction that triggered the command.

Functions