# Path: marvinbot/defaults.py
# DEFAULT_PRIORITY = 2
# 
# Path: marvinbot/errors.py
# class PluginLoadException(Exception):
#     pass
# 
# Path: marvinbot/signals.py



from flask import Blueprint
from marvinbot.defaults import DEFAULT_PRIORITY
from marvinbot.errors import PluginLoadException
from marvinbot.signals import plugin_loaded
from urllib.parse import quote_plus
import importlib
import logging
                    log.exception(e)


class Plugin(object):
    """An object representing a bot plugin"""
    def __init__(self, name=None, enabled=True, config=None):
        self.name = name

        # These will get filled in by the plugin loader later
        self.config = config
        self.modspec = None
        self.adapter = None
        self.enabled = enabled

    def get_default_config(self) -> dict:
        """Returns a dict with the default config for the plugin.

        Subclasses can override this method to provide different defaults"""
        return {
            'short_name': self.name,
            'enabled': True
        }

    def get_config(self):
        config = self.get_default_config()
        config.update(self.config)

        return config

    def _do_configure(self):

# Path: marvinbot/defaults.py
# DEFAULT_PRIORITY = 2
# 
# Path: marvinbot/errors.py
# class PluginLoadException(Exception):
#     pass
# 
# Path: marvinbot/signals.py



# Path: marvinbot/plugins.py
from flask import Blueprint
from marvinbot.defaults import DEFAULT_PRIORITY
from marvinbot.errors import PluginLoadException
from marvinbot.signals import plugin_loaded
from urllib.parse import quote_plus
import importlib
import logging

                    log.exception(e)


class Plugin(object):
    """An object representing a bot plugin"""
    def __init__(self, name=None, enabled=True, config=None):
        self.name = name

        # These will get filled in by the plugin loader later
        self.config = config
        self.modspec = None
        self.adapter = None
        self.enabled = enabled

    def get_default_config(self) -> dict:
        """Returns a dict with the default config for the plugin.

        Subclasses can override this method to provide different defaults"""
        return {
            'short_name': self.name,
            'enabled': True
        }

    def get_config(self):
        config = self.get_default_config()
        config.update(self.config)

        return config

    def _do_configure(self):

        config = self.get_config()