add miraiApiHTTP server settings

This commit is contained in:
2021-05-09 07:34:07 +08:00
parent ed86bd225a
commit 6c47f8bfcd
3 changed files with 24 additions and 4 deletions

View File

@@ -54,6 +54,8 @@ class settings:
d['retryTTL']) if 'retryTTL' in d and d['retryTTL'] != '' else RetryTTLList()
self._botOwnerList = BotOwnerList(
self._main, d['botOwnerList']) if 'botOwnerList' in d and d['botOwnerList'] != '' else BotOwnerList(self._main)
self._miraiApiHTTPServer = d['miraiApiHTTPServer'] if 'miraiApiHTTPServer' in d and d['miraiApiHTTPServer'] != '' else None
self._miraiApiHTTPAuthKey = d['miraiApiHTTPAuthKey'] if 'miraiApiHTTPAuthKey' in d and d['miraiApiHTTPAuthKey'] != '' else None
@property
def token(self) -> str:
@@ -103,6 +105,14 @@ class settings:
def botOwnerList(self) -> BotOwnerList:
return self._botOwnerList
@property
def miraiApiHTTPServer(self) -> str:
return self._miraiApiHTTPServer
@property
def miraiApiHTTPAuthKey(self) -> str:
return self._miraiApiHTTPAuthKey
class commandline:
def __init__(self, commandline: List[str] = None):