    def _load_config(self, config_path):
        # type: (str) -> None
        '''
        Loads a configuration file for the bot.
        '''
        logging.info('Loading configuration.')
        with open(config_path, 'r') as f:
            config = yaml.safe_load(f)

            # Required parameters
            try:
                self._load_messages(config['messages_path'])
                self._load_commands(config['commands_path'])
            except KeyError as e:
                logging.error('Missing parameter: {0}'.format(e))
                raise SecurityBotException('Configuration file missing parameters.')

            # Optional parameters
            self.icon_url = config.get('icon_url', 'https://placehold.it/256x256')
Loads a configuration file for the bot.
securitybot/bot.py