Skip to content

Base notify

BaseNotify

Bases: BaseSettings

Methods:

Name Description
send_notify

title

title: str = Field(
    ...,
    title="Title",
    description="The title of the notification message.",
    frozen=True,
    deprecated=False,
)

content

content: str = Field(
    default="",
    title="Content",
    description="The content of the notification message.",
    frozen=True,
    deprecated=False,
)

description

description: str = Field(
    ...,
    title="Description",
    description="The description of the notification message.",
    frozen=True,
    deprecated=False,
)

send_notify

send_notify() -> None
Source code in src/utils/notifications/base_notify.py
async def send_notify(self) -> None:
    try:
        await self._send_notify()
    except Exception:
        logfire.error("Failed to send Discord notification.")