INNER CODE UNIT · Python

listen

opsdroid/opsdroid · opsdroid/connector/__init__.py:120

    async def listen(self):
        """Listen to chat service and parse all messages.

        This method should block the thread with an infinite loop and create
        Message objects for chat messages coming from the service. It should
        then call `await opsdroid.parse(message)` on those messages.

        As the method should include some kind of `while True` all messages
        from the chat service should be "awaited" asyncronously to avoid
        blocking the thread.
        """
        raise NotImplementedError

    async def _unknown_event(self, event, target=None):
        """Fallback for when the subclass can not handle the event type."""
        raise TypeError(
            "Connector {stype} can not handle the"
            " '{eventt.__name__}' event type.".format(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…