INNER CODE UNIT · Python

lock_pool

PleasePrompto/ductor · ductor_bot/messenger/telegram/app.py:296

    def lock_pool(self) -> LockPool:
        """Shared lock pool (used by middleware, bus, and API server)."""
        return self._lock_pool

    def _is_addressed(self, message: Message) -> bool:
        """True if the message is addressed to this bot instance."""
        if message.chat.type not in ("group", "supergroup"):
            return True
        return is_message_addressed(message, self._bot_id, self._bot_username)

    def _is_for_others(self, message: Message) -> bool:
        """True if the message is a command explicitly for another bot."""
        if message.chat.type not in ("group", "supergroup"):
            return False
        return is_command_for_others(message, self._bot_username)

    def file_roots(self, paths: DuctorPaths) -> list[Path] | None:
        """Allowed root directories for ``<file:...>`` tag sends."""

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…