# Buggy code
async def get_ranked_skills(self, message):
    """Take a message and return a ranked list of matching skills."""
    skills = []
    skills = skills + await parse_regex(self, message)

    if "parsers" in self.config:
        _LOGGER.debug("Processing parsers...")
        parsers = self.config["parsers"]

        dialogflow = [
            p for p in parsers if p["name"] == "dialogflow" or p["name"] == "apiai"
        ]

        # Show deprecation message but  parse message
        # Once it stops working remove this bit
        apiai = [p for p in parsers if p["name"] == "apiai"]
        if apiai:
            _LOGGER.warning(
                "Api.ai is now called Dialogflow. This "
                "parser will stop working in the future "
                "please swap: 'name: apiai' for "
                "'name: dialogflow' in configuration.yaml"
            )

        if len(dialogflow) == 1 and (
            "enabled" not in dialogflow[0] or dialogflow[0]["enabled"] is not False
        ):
            _LOGGER.debug("Checking dialogflow...")
            skills = skills + await parse_dialogflow(self, message, dialogflow[0])

        luisai = [p for p in parsers if p["name"] == "luisai"]
        if len(luisai) == 1 and (
            "enabled" not in luisai[0] or luisai[0]["enabled"] is not False
        ):
            _LOGGER.debug("Checking luisai...")
            skills = skills + await parse_luisai(self, message, luisai[0])

        recastai = [p for p in parsers if p["name"] == "recastai"]
        if len(recastai) == 1 and (
            "enabled" not in recastai[0] or recastai[0]["enabled"] is not False
        ):
            _LOGGER.debug("Checking Recast.AI...")
            skills = skills + await parse_recastai(self, message, recastai[0])

        witai = [p for p in parsers if p["name"] == "witai"]
        if len(witai) == 1 and (
            "enabled" not in witai[0] or witai[0]["enabled"] is not False
        ):
            _LOGGER.debug("Checking wit.ai...")
            skills = skills + await parse_witai(self, message, witai[0])

    return sorted(skills, key=lambda k: k["score"], reverse=True)


# Traceback (TypeError)
DEBUG opsdroid.core: Parsing input: hi
DEBUG opsdroid.core: Processing parsers...
ERROR aiohttp.server: Error handling request
Traceback (most recent call last):
File "/Users/jacob/.pyenv/versions/3.5.4/lib/python3.5/site-packages/aiohttp/web_protocol.py", line 416, in start
resp = yield from self._request_handler(request)
File "/Users/jacob/.pyenv/versions/3.5.4/lib/python3.5/site-packages/aiohttp/web.py", line 325, in _handle
resp = yield from handler(request)
File "/Users/jacob/.opsdroid/modules/opsdroid-modules/connector/websocket/__init__.py", line 77, in websocket_handler
await self.opsdroid.parse(message)
File "/Users/jacob/Projects/opsdroid/opsdroid/opsdroid/core.py", line 273, in parse
ranked_skills = await self.get_ranked_skills(message)
File "/Users/jacob/Projects/opsdroid/opsdroid/opsdroid/core.py", line 218, in get_ranked_skills
dialogflow = [p for p in parsers if p["name"] == "dialogflow"
TypeError: 'NoneType' object is not iterable

# Fixed code
async def get_ranked_skills(self, message):
    """Take a message and return a ranked list of matching skills."""
    skills = []
    skills = skills + await parse_regex(self, message)

    if "parsers" in self.config:
        _LOGGER.debug("Processing parsers...")
        parsers = self.config["parsers"] or []

        dialogflow = [
            p for p in parsers if p["name"] == "dialogflow" or p["name"] == "apiai"
        ]

        # Show deprecation message but  parse message
        # Once it stops working remove this bit
        apiai = [p for p in parsers if p["name"] == "apiai"]
        if apiai:
            _LOGGER.warning(
                "Api.ai is now called Dialogflow. This "
                "parser will stop working in the future "
                "please swap: 'name: apiai' for "
                "'name: dialogflow' in configuration.yaml"
            )

        if len(dialogflow) == 1 and (
            "enabled" not in dialogflow[0] or dialogflow[0]["enabled"] is not False
        ):
            _LOGGER.debug("Checking dialogflow...")
            skills = skills + await parse_dialogflow(self, message, dialogflow[0])

        luisai = [p for p in parsers if p["name"] == "luisai"]
        if len(luisai) == 1 and (
            "enabled" not in luisai[0] or luisai[0]["enabled"] is not False
        ):
            _LOGGER.debug("Checking luisai...")
            skills = skills + await parse_luisai(self, message, luisai[0])

        recastai = [p for p in parsers if p["name"] == "recastai"]
        if len(recastai) == 1 and (
            "enabled" not in recastai[0] or recastai[0]["enabled"] is not False
        ):
            _LOGGER.debug("Checking Recast.AI...")
            skills = skills + await parse_recastai(self, message, recastai[0])

        witai = [p for p in parsers if p["name"] == "witai"]
        if len(witai) == 1 and (
            "enabled" not in witai[0] or witai[0]["enabled"] is not False
        ):
            _LOGGER.debug("Checking wit.ai...")
            skills = skills + await parse_witai(self, message, witai[0])

    return sorted(skills, key=lambda k: k["score"], reverse=True)