mirror of
https://github.com/xfgryujk/blivechat.git
synced 2026-08-19 09:43:28 +08:00
添加插件管理后端
This commit is contained in:
@@ -72,6 +72,10 @@ def iter_plugins() -> Iterable['Plugin']:
|
||||
return _plugins.values()
|
||||
|
||||
|
||||
def get_plugin(plugin_id):
|
||||
return _plugins.get(plugin_id, None)
|
||||
|
||||
|
||||
def get_plugin_by_token(token):
|
||||
if token == '':
|
||||
return None
|
||||
@@ -156,6 +160,10 @@ class Plugin:
|
||||
def id(self):
|
||||
return self._id
|
||||
|
||||
@property
|
||||
def config(self):
|
||||
return self._config
|
||||
|
||||
@property
|
||||
def enabled(self):
|
||||
return self._config.enabled
|
||||
|
||||
Reference in New Issue
Block a user