INNER CODE UNIT · Python
_is_for_others
PleasePrompto/ductor · ductor_bot/messenger/telegram/app.py:306
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."""
return resolve_allowed_roots(self._config.file_access, paths.workspace)
async def broadcast(self, text: str, opts: SendRichOpts | None = None) -> None:
"""Send a message to all allowed users."""
for uid in self._config.allowed_user_ids:
await send_rich(self._bot, uid, text, opts)
async def notify_startup(self, text: str) -> None:
"""Route startup-lifecycle notifications (#64).