mirror of
https://github.com/maubot/maubot
synced 2025-08-29 19:00:39 +00:00
Switch to yaml for plugin metadata. Fixes #33
This commit is contained in:
parent
55685dfd6e
commit
07fe46e7f9
6 changed files with 86 additions and 62 deletions
|
@ -135,7 +135,7 @@ class PluginInstance:
|
|||
self.db_instance.enabled = False
|
||||
return
|
||||
self.started = True
|
||||
self.log.info(f"Started instance of {self.loader.id} v{self.loader.version} "
|
||||
self.log.info(f"Started instance of {self.loader.meta.id} v{self.loader.meta.version} "
|
||||
f"with user {self.client.id}")
|
||||
|
||||
async def stop(self) -> None:
|
||||
|
@ -199,12 +199,12 @@ class PluginInstance:
|
|||
except KeyError:
|
||||
return False
|
||||
await self.stop()
|
||||
self.db_instance.type = loader.id
|
||||
self.db_instance.type = loader.meta.id
|
||||
self.loader.references.remove(self)
|
||||
self.loader = loader
|
||||
self.loader.references.add(self)
|
||||
await self.start()
|
||||
self.log.debug(f"Type switched to {self.loader.id}")
|
||||
self.log.debug(f"Type switched to {self.loader.meta.id}")
|
||||
return True
|
||||
|
||||
async def update_started(self, started: bool) -> None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue