mirror of
https://github.com/maubot/maubot.git
synced 2024-10-01 01:06:10 -04:00
Expose plugin metadata in standalone mode loader
This commit is contained in:
parent
f0e2bb3d62
commit
41cbf6d788
@ -115,7 +115,7 @@ else:
|
||||
main_class = meta.main_class
|
||||
bot_module = importlib.import_module(module)
|
||||
plugin: type[Plugin] = getattr(bot_module, main_class)
|
||||
loader = FileSystemLoader(os.path.dirname(args.meta))
|
||||
loader = FileSystemLoader(os.path.dirname(args.meta), meta)
|
||||
|
||||
log.info(f"Initializing standalone {meta.id} v{meta.version} on maubot {__version__}")
|
||||
|
||||
|
@ -18,12 +18,13 @@ from __future__ import annotations
|
||||
import os
|
||||
import os.path
|
||||
|
||||
from ..loader import BasePluginLoader
|
||||
from ..loader import BasePluginLoader, PluginMeta
|
||||
|
||||
|
||||
class FileSystemLoader(BasePluginLoader):
|
||||
def __init__(self, path: str) -> None:
|
||||
def __init__(self, path: str, meta: PluginMeta) -> None:
|
||||
self.path = path
|
||||
self.meta = meta
|
||||
|
||||
@property
|
||||
def source(self) -> str:
|
||||
|
Loading…
Reference in New Issue
Block a user