fix: this was wip, im not ready to migrate yet

This commit is contained in:
əlemi 2022-08-25 19:52:52 +02:00
parent b14ca9d862
commit ba721a4b30
No known key found for this signature in database
GPG key ID: BBCBFE5D7244634E

View file

@ -1,3 +1,4 @@
from datetime import datetime
import json import json
import logging import logging
@ -84,13 +85,16 @@ class Addon:
else: # not really necessary since it's a dataclass but whatever else: # not really necessary since it's a dataclass but whatever
opts[field.name] = default opts[field.name] = default
self.config = self.Options(**opts) self.config = self.Options(**opts)
self.storage = client.storage.addon_storage(self.name) self.storage = self.init_storage()
self.logger = self._client.logger.getChild(self.name) self.logger = self._client.logger.getChild(self.name)
self.register() self.register()
def register(self): def register(self):
pass pass
def init_storage(self) -> AddonStorage:
return self.client.storage.addon_storage(self.name)
async def initialize(self): async def initialize(self):
pass pass