Added device info and bot prefix
All checks were successful
All checks were successful
This commit is contained in:
parent
b76f727263
commit
a458788841
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user