INNER CODE UNIT · Python

Connector

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

class Connector:
    """A base connector.

    Connectors are used to interact with a given chat service.

    """

    def __new__(cls, *args, **kwargs):
        """Create the class object.

        Before constructing the class parse all the methods that have been
        decorated with ``register_event``.
        """
        # Get all 'function' members as the wrapped methods are functions
        # This returns a tuple of (name, function) for each method.
        functions = inspect.getmembers(cls, predicate=inspect.isfunction)

        # Filter out anything that's not got the attribute __opsdroid_event__

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…