Added device info and bot prefix
All checks were successful
Analysis / SonarCloud (pull_request) Successful in 41s
Tests / Build and Test (3.11) (pull_request) Successful in 1m17s
Tests / Build and Test (3.12) (pull_request) Successful in 1m58s
Tests / Build and Test (3.13) (pull_request) Successful in 1m21s

This commit is contained in:
Profitroll 2025-01-04 18:01:49 +01:00
parent b76f727263
commit a458788841
Signed by: profitroll
GPG Key ID: FA35CAB49DACD3B2

View File

@ -5,6 +5,7 @@ from typing import Dict, Any
from typing_extensions import override
from ... import __version__ as __libbot_version__
from ...i18n.classes import BotLocale
from ...utils import json_read
@ -39,12 +40,20 @@ class MatrixBot(Bot):
homeserver=self.bot_config["bot"]["homeserver"],
username=self.bot_config["bot"]["username"],
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,
)
self.bot_prefix: str = (
"!" if "prefix" not in self.bot_config["bot"] else self.bot_config["bot"]["prefix"]
)
self.bot_locale: BotLocale = BotLocale(
default_locale=self.bot_config["locale"],
locales_root=(Path("locale") if locales_root is None else locales_root),