Skip to content

whos_there.senders.discord

docs module whos_there.senders.discord

from typing import Any

from whos_there.senders.base import Sender


class DiscordSender(Sender):
    def __init__(self, webhook_url: str) -> None:
        """Initialize the Discord sender.

        Args:
            webhook_url: The Discord webhook URL.
        """
        super().__init__()
        self.webhook_url = webhook_url

    def send(self, text: str) -> Any:
        return self._send_json(self.webhook_url, {"content": text})