WIP: Matrix support #175
@ -5,6 +5,7 @@ from typing import Dict, Any
|
|||||||
|
|
||||||
from typing_extensions import override
|
from typing_extensions import override
|
||||||
|
|
||||||
|
from ... import __version__ as __libbot_version__
|
||||||
from ...i18n.classes import BotLocale
|
from ...i18n.classes import BotLocale
|
||||||
from ...utils import json_read
|
from ...utils import json_read
|
||||||
|
|
||||||
@ -39,12 +40,20 @@ class MatrixBot(Bot):
|
|||||||
homeserver=self.bot_config["bot"]["homeserver"],
|
homeserver=self.bot_config["bot"]["homeserver"],
|
||||||
username=self.bot_config["bot"]["username"],
|
username=self.bot_config["bot"]["username"],
|
||||||
password=self.bot_config["bot"]["password"],
|
password=self.bot_config["bot"]["password"],
|
||||||
device_name=self.bot_config["bot"]["device_name"],
|
device_name=(
|
||||||
|
f"LibBotUniversal v{__libbot_version__}"
|
||||||
|
if "device_name" not in self.bot_config["bot"]
|
||||||
|
else self.bot_config["bot"]["device_name"]
|
||||||
|
),
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
config=smbl_config,
|
config=smbl_config,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self.bot_prefix: str = (
|
||||||
|
"!" if "prefix" not in self.bot_config["bot"] else self.bot_config["bot"]["prefix"]
|
||||||
|
)
|
||||||
|
|
||||||
self.bot_locale: BotLocale = BotLocale(
|
self.bot_locale: BotLocale = BotLocale(
|
||||||
default_locale=self.bot_config["locale"],
|
default_locale=self.bot_config["locale"],
|
||||||
locales_root=(Path("locale") if locales_root is None else locales_root),
|
locales_root=(Path("locale") if locales_root is None else locales_root),
|
||||||
|
Loading…
Reference in New Issue
Block a user