Made version in presence optional
This commit is contained in:
parent
52035af0cc
commit
24d5bbf4d8
@ -86,10 +86,10 @@
|
||||
"no_permission_message": "Nein!\nIch höre nicht auf dich ¯\\_(ツ)_/¯",
|
||||
"not_implemented_yet": "Ey Alter, das kann ich noch nicht...",
|
||||
"presence": {
|
||||
"booting": "{} Ich fahre gerade hoch...",
|
||||
"restart": "{} Muss neue Kekse holen...",
|
||||
"running": "{} Ich esse Kekse :D",
|
||||
"shutdown": "{} Ich werde bestimmt wieder kommen..."
|
||||
"booting": "Ich fahre gerade hoch...",
|
||||
"restart": "Muss neue Kekse holen...",
|
||||
"running": "Ich esse Kekse :D",
|
||||
"shutdown": "Ich werde bestimmt wieder kommen..."
|
||||
}
|
||||
},
|
||||
"modules": {
|
||||
|
@ -10,11 +10,12 @@ class FeatureFlagsEnum(Enum):
|
||||
boot_log_module = "BootLogModule"
|
||||
core_module = "CoreModule"
|
||||
core_extension_module = "CoreExtensionModule"
|
||||
data_module = ("DataModule",)
|
||||
database_module = ("DatabaseModule",)
|
||||
data_module = "DataModule"
|
||||
database_module = "DatabaseModule"
|
||||
level_module = "LevelModule"
|
||||
moderator_module = "ModeratorModule"
|
||||
permission_module = "PermissionModule"
|
||||
# features
|
||||
api_only = "ApiOnly"
|
||||
presence = "Presence"
|
||||
version_in_presence = "VersionInPresence"
|
||||
|
@ -1,5 +1,4 @@
|
||||
import traceback
|
||||
from typing import Optional, Callable
|
||||
|
||||
from cpl_core.configuration.configuration_model_abc import ConfigurationModelABC
|
||||
from cpl_core.console import Console
|
||||
@ -27,6 +26,7 @@ class FeatureFlagsSettings(ConfigurationModelABC):
|
||||
# features
|
||||
FeatureFlagsEnum.api_only.value: False, # 13.10.2022 #70
|
||||
FeatureFlagsEnum.presence.value: True, # 03.10.2022 #56
|
||||
FeatureFlagsEnum.version_in_presence.value: False, # 21.03.2023 #253
|
||||
}
|
||||
|
||||
def get_flag(self, key: FeatureFlagsEnum) -> bool:
|
||||
|
@ -111,7 +111,11 @@ class ClientUtilsService(ClientUtilsABC):
|
||||
|
||||
import bot
|
||||
|
||||
name = self._t.transform(t_key).format(bot.__version__)
|
||||
if self._feature_flags.get_flag(FeatureFlagsEnum.version_in_presence):
|
||||
name = f"{bot.__version__} {self._t.transform(t_key)}"
|
||||
else:
|
||||
name = self._t.transform(t_key)
|
||||
|
||||
await self._bot.change_presence(activity=discord.Game(name=name))
|
||||
self._logger.info(__name__, f"Set presence {name}")
|
||||
|
||||
|
@ -258,7 +258,6 @@ export class AuthService {
|
||||
|
||||
async isUserLoggedInAsync(): Promise<boolean> {
|
||||
const token = this.getToken();
|
||||
console.log(1, token);
|
||||
|
||||
if (!token || !token.refreshToken) {
|
||||
this.isLoggedIn$.next(false);
|
||||
|
Loading…
Reference in New Issue
Block a user