def __init__(self, name=None, slack_client=None, plugin_config=None):
'''
A plugin in initialized with:
- name (str)
- slack_client - a connected instance of SlackClient - can be used to make API
calls within the plugins
- plugin config (dict) - (from the yaml config)
Values in config:
- DEBUG (bool) - this will be overridden if debug is set in config for this plugin
'''
if name is None:
self.name = type(self).__name__
else:
self.name = name
if plugin_config is None:
self.plugin_config = {}
else:
self.plugin_config = plugin_config
self.slack_client = slack_client
self.jobs = []
self.debug = self.plugin_config.get('DEBUG', False)
self.outputs = []
评论列表
文章目录