From 69882af0bd49e479e672808267891788b7e602ae Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 9 Dec 2023 13:55:40 +0100 Subject: [PATCH 01/30] Added event logger --- bot/src/bot/config | 2 +- bot/src/bot/startup.py | 2 ++ .../core_extension_on_ready_event.py | 6 ++---- bot/src/bot_core/events/core_on_ready_event.py | 4 ++-- bot/src/bot_core/logging/event_logger.py | 15 +++++++++++++++ .../base/events/base_on_command_error_event.py | 4 ++-- .../base/events/base_on_guild_join_event.py | 4 ++-- .../base/events/base_on_member_join_event.py | 6 +++--- .../base/events/base_on_member_remove_event.py | 4 ++-- .../base/events/base_on_raw_reaction_add.py | 3 ++- .../base/events/base_on_raw_reaction_remove.py | 3 ++- .../base_on_scheduled_event_update_event.py | 3 ++- .../events/base_on_voice_state_update_event.py | 3 ++- ...se_on_voice_state_update_event_help_channel.py | 3 ++- ...ce_state_update_event_scheduled_event_bonus.py | 3 ++- .../modules/boot_log/boot_log_on_ready_event.py | 3 ++- .../config/events/config_on_ready_event.py | 4 ++-- .../level/events/level_on_member_join_event.py | 3 ++- .../events/level_on_raw_reaction_add_event.py | 3 ++- .../events/level_on_raw_reaction_remove_event.py | 3 ++- .../events/level_on_voice_state_update_event.py | 3 ++- 21 files changed, 55 insertions(+), 29 deletions(-) create mode 100644 bot/src/bot_core/logging/event_logger.py diff --git a/bot/src/bot/config b/bot/src/bot/config index 4669bf7c..be5b15f2 160000 --- a/bot/src/bot/config +++ b/bot/src/bot/config @@ -1 +1 @@ -Subproject commit 4669bf7c43c7aec368a1a1917ea92038c007944f +Subproject commit be5b15f227e7b2b12cc73c0edd7f6fa95dbdd52f diff --git a/bot/src/bot/startup.py b/bot/src/bot/startup.py index 0a5422d2..35e628f3 100644 --- a/bot/src/bot/startup.py +++ b/bot/src/bot/startup.py @@ -15,6 +15,7 @@ from bot_core.configuration.feature_flags_enum import FeatureFlagsEnum from bot_core.configuration.feature_flags_settings import FeatureFlagsSettings from bot_core.logging.command_logger import CommandLogger from bot_core.logging.database_logger import DatabaseLogger +from bot_core.logging.event_logger import EventLogger from bot_core.logging.message_logger import MessageLogger from bot_core.logging.task_logger import TaskLogger from bot_data.db_context import DBContext @@ -45,6 +46,7 @@ class Startup(StartupABC): services.add_singleton(CustomFileLoggerABC, DatabaseLogger) services.add_singleton(CustomFileLoggerABC, MessageLogger) services.add_singleton(CustomFileLoggerABC, TaskLogger) + services.add_singleton(CustomFileLoggerABC, EventLogger) if self._feature_flags.get_flag(FeatureFlagsEnum.api_module): services.add_singleton(CustomFileLoggerABC, ApiLogger) diff --git a/bot/src/bot_core/core_extension/core_extension_on_ready_event.py b/bot/src/bot_core/core_extension/core_extension_on_ready_event.py index 277cf566..6b0621dc 100644 --- a/bot/src/bot_core/core_extension/core_extension_on_ready_event.py +++ b/bot/src/bot_core/core_extension/core_extension_on_ready_event.py @@ -1,20 +1,18 @@ -import asyncio - from cpl_core.configuration import ConfigurationABC -from cpl_core.logging import LoggerABC from cpl_discord.events import OnReadyABC from cpl_discord.service import DiscordBotServiceABC from cpl_translation import TranslatePipe from bot_core.abc.client_utils_abc import ClientUtilsABC from bot_core.environment_variables import MAINTENANCE +from bot_core.logging.event_logger import EventLogger class CoreExtensionOnReadyEvent(OnReadyABC): def __init__( self, config: ConfigurationABC, - logger: LoggerABC, + logger: EventLogger, bot: DiscordBotServiceABC, client_utils: ClientUtilsABC, t: TranslatePipe, diff --git a/bot/src/bot_core/events/core_on_ready_event.py b/bot/src/bot_core/events/core_on_ready_event.py index 10a88f9d..8dd915ba 100644 --- a/bot/src/bot_core/events/core_on_ready_event.py +++ b/bot/src/bot_core/events/core_on_ready_event.py @@ -1,15 +1,15 @@ -from cpl_core.logging import LoggerABC from cpl_discord.events import OnReadyABC from cpl_discord.service import DiscordBotServiceABC from cpl_translation import TranslatePipe from bot_core.abc.client_utils_abc import ClientUtilsABC +from bot_core.logging.event_logger import EventLogger class CoreOnReadyEvent(OnReadyABC): def __init__( self, - logger: LoggerABC, + logger: EventLogger, bot: DiscordBotServiceABC, client_utils: ClientUtilsABC, t: TranslatePipe, diff --git a/bot/src/bot_core/logging/event_logger.py b/bot/src/bot_core/logging/event_logger.py new file mode 100644 index 00000000..28fdde12 --- /dev/null +++ b/bot/src/bot_core/logging/event_logger.py @@ -0,0 +1,15 @@ +from cpl_core.configuration import ConfigurationABC +from cpl_core.environment import ApplicationEnvironmentABC +from cpl_core.time import TimeFormatSettings + +from bot_core.abc.custom_file_logger_abc import CustomFileLoggerABC + + +class EventLogger(CustomFileLoggerABC): + def __init__( + self, + config: ConfigurationABC, + time_format: TimeFormatSettings, + env: ApplicationEnvironmentABC, + ): + CustomFileLoggerABC.__init__(self, "Task", config, time_format, env) diff --git a/bot/src/modules/base/events/base_on_command_error_event.py b/bot/src/modules/base/events/base_on_command_error_event.py index d371a2aa..7511879b 100644 --- a/bot/src/modules/base/events/base_on_command_error_event.py +++ b/bot/src/modules/base/events/base_on_command_error_event.py @@ -1,7 +1,6 @@ import datetime import uuid -from cpl_core.logging import LoggerABC from cpl_core.time import TimeFormatSettings from cpl_discord.events.on_command_error_abc import OnCommandErrorABC from cpl_discord.service import DiscordBotServiceABC @@ -12,13 +11,14 @@ from discord.ext.commands import Context, CommandError from bot_core.abc.message_service_abc import MessageServiceABC from bot_core.exception.check_error import CheckError from bot_core.helper.event_checks import EventChecks +from bot_core.logging.event_logger import EventLogger from bot_data.model.technician_config import TechnicianConfig class BaseOnCommandErrorEvent(OnCommandErrorABC): def __init__( self, - logger: LoggerABC, + logger: EventLogger, bot: DiscordBotServiceABC, messenger: MessageServiceABC, tech_settings: TechnicianConfig, diff --git a/bot/src/modules/base/events/base_on_guild_join_event.py b/bot/src/modules/base/events/base_on_guild_join_event.py index 644fd194..627b8c3b 100644 --- a/bot/src/modules/base/events/base_on_guild_join_event.py +++ b/bot/src/modules/base/events/base_on_guild_join_event.py @@ -1,10 +1,10 @@ from cpl_core.database.context import DatabaseContextABC -from cpl_core.logging import LoggerABC from cpl_discord.events import OnGuildJoinABC from cpl_discord.service import DiscordBotServiceABC from discord import Guild from bot_core.helper.event_checks import EventChecks +from bot_core.logging.event_logger import EventLogger from bot_data.abc.server_config_repository_abc import ServerConfigRepositoryABC from bot_data.abc.server_repository_abc import ServerRepositoryABC from bot_data.model.server import Server @@ -14,7 +14,7 @@ from bot_data.service.seeder_service import SeederService class BaseOnGuildJoinEvent(OnGuildJoinABC): def __init__( self, - logger: LoggerABC, + logger: EventLogger, bot: DiscordBotServiceABC, servers: ServerRepositoryABC, server_config: ServerConfigRepositoryABC, diff --git a/bot/src/modules/base/events/base_on_member_join_event.py b/bot/src/modules/base/events/base_on_member_join_event.py index 63054277..4cd4f2e3 100644 --- a/bot/src/modules/base/events/base_on_member_join_event.py +++ b/bot/src/modules/base/events/base_on_member_join_event.py @@ -4,14 +4,15 @@ from typing import Union import discord from cpl_core.configuration import ConfigurationABC from cpl_core.database.context import DatabaseContextABC -from cpl_core.logging import LoggerABC from cpl_discord.events import OnMemberJoinABC from cpl_discord.service import DiscordBotServiceABC from cpl_translation import TranslatePipe from bot_core.abc.client_utils_abc import ClientUtilsABC from bot_core.abc.message_service_abc import MessageServiceABC +from bot_core.abc.permission_service_abc import PermissionServiceABC from bot_core.helper.event_checks import EventChecks +from bot_core.logging.event_logger import EventLogger from bot_data.abc.known_user_repository_abc import KnownUserRepositoryABC from bot_data.abc.server_repository_abc import ServerRepositoryABC from bot_data.abc.user_joined_server_repository_abc import UserJoinedServerRepositoryABC @@ -20,14 +21,13 @@ from bot_data.model.known_user import KnownUser from bot_data.model.server_config import ServerConfig from bot_data.model.user import User from bot_data.model.user_joined_server import UserJoinedServer -from bot_core.abc.permission_service_abc import PermissionServiceABC class BaseOnMemberJoinEvent(OnMemberJoinABC): def __init__( self, config: ConfigurationABC, - logger: LoggerABC, + logger: EventLogger, messenger: MessageServiceABC, permissions: PermissionServiceABC, db: DatabaseContextABC, diff --git a/bot/src/modules/base/events/base_on_member_remove_event.py b/bot/src/modules/base/events/base_on_member_remove_event.py index c32d9be6..c5eb70b0 100644 --- a/bot/src/modules/base/events/base_on_member_remove_event.py +++ b/bot/src/modules/base/events/base_on_member_remove_event.py @@ -4,12 +4,12 @@ from typing import Union import discord from cpl_core.configuration import ConfigurationABC from cpl_core.database.context import DatabaseContextABC -from cpl_core.logging import LoggerABC from cpl_discord.events import OnMemberRemoveABC from cpl_translation import TranslatePipe from bot_core.abc.message_service_abc import MessageServiceABC from bot_core.helper.event_checks import EventChecks +from bot_core.logging.event_logger import EventLogger from bot_data.abc.server_repository_abc import ServerRepositoryABC from bot_data.abc.user_joined_server_repository_abc import UserJoinedServerRepositoryABC from bot_data.abc.user_repository_abc import UserRepositoryABC @@ -20,7 +20,7 @@ class BaseOnMemberRemoveEvent(OnMemberRemoveABC): def __init__( self, config: ConfigurationABC, - logger: LoggerABC, + logger: EventLogger, db: DatabaseContextABC, message_service: MessageServiceABC, users: UserRepositoryABC, diff --git a/bot/src/modules/base/events/base_on_raw_reaction_add.py b/bot/src/modules/base/events/base_on_raw_reaction_add.py index 72e06099..7cab11b3 100644 --- a/bot/src/modules/base/events/base_on_raw_reaction_add.py +++ b/bot/src/modules/base/events/base_on_raw_reaction_add.py @@ -4,6 +4,7 @@ from cpl_discord.service import DiscordBotServiceABC from discord import RawReactionActionEvent from bot_core.helper.event_checks import EventChecks +from bot_core.logging.event_logger import EventLogger from bot_data.abc.auto_role_repository_abc import AutoRoleRepositoryABC from bot_data.abc.server_repository_abc import ServerRepositoryABC from modules.base.helper.base_reaction_handler import BaseReactionHandler @@ -12,7 +13,7 @@ from modules.base.helper.base_reaction_handler import BaseReactionHandler class BaseOnRawReactionAddEvent(OnRawReactionAddABC): def __init__( self, - logger: LoggerABC, + logger: EventLogger, bot: DiscordBotServiceABC, servers: ServerRepositoryABC, auto_roles: AutoRoleRepositoryABC, diff --git a/bot/src/modules/base/events/base_on_raw_reaction_remove.py b/bot/src/modules/base/events/base_on_raw_reaction_remove.py index 273fada1..35124df4 100644 --- a/bot/src/modules/base/events/base_on_raw_reaction_remove.py +++ b/bot/src/modules/base/events/base_on_raw_reaction_remove.py @@ -4,6 +4,7 @@ from cpl_discord.service import DiscordBotServiceABC from discord import RawReactionActionEvent from bot_core.helper.event_checks import EventChecks +from bot_core.logging.event_logger import EventLogger from bot_data.abc.auto_role_repository_abc import AutoRoleRepositoryABC from bot_data.abc.server_repository_abc import ServerRepositoryABC from modules.base.helper.base_reaction_handler import BaseReactionHandler @@ -12,7 +13,7 @@ from modules.base.helper.base_reaction_handler import BaseReactionHandler class BaseOnRawReactionRemoveEvent(OnRawReactionRemoveABC): def __init__( self, - logger: LoggerABC, + logger: EventLogger, bot: DiscordBotServiceABC, servers: ServerRepositoryABC, auto_roles: AutoRoleRepositoryABC, diff --git a/bot/src/modules/base/events/base_on_scheduled_event_update_event.py b/bot/src/modules/base/events/base_on_scheduled_event_update_event.py index a9000330..b12be8ac 100644 --- a/bot/src/modules/base/events/base_on_scheduled_event_update_event.py +++ b/bot/src/modules/base/events/base_on_scheduled_event_update_event.py @@ -5,6 +5,7 @@ from cpl_discord.service import DiscordBotServiceABC from discord import EventStatus from bot_core.helper.event_checks import EventChecks +from bot_core.logging.event_logger import EventLogger from modules.base.model.active_event import ActiveEvent from modules.base.service.event_service import EventService @@ -12,7 +13,7 @@ from modules.base.service.event_service import EventService class BaseOnScheduledEventUpdateEvent(OnScheduledEventUpdateABC): def __init__( self, - logger: LoggerABC, + logger: EventLogger, bot: DiscordBotServiceABC, events: EventService, ): diff --git a/bot/src/modules/base/events/base_on_voice_state_update_event.py b/bot/src/modules/base/events/base_on_voice_state_update_event.py index 32036120..87601b78 100644 --- a/bot/src/modules/base/events/base_on_voice_state_update_event.py +++ b/bot/src/modules/base/events/base_on_voice_state_update_event.py @@ -8,6 +8,7 @@ from cpl_core.logging import LoggerABC from cpl_discord.events import OnVoiceStateUpdateABC from bot_core.helper.event_checks import EventChecks +from bot_core.logging.event_logger import EventLogger from bot_data.abc.known_user_repository_abc import KnownUserRepositoryABC from bot_data.abc.server_repository_abc import ServerRepositoryABC from bot_data.abc.user_joined_server_repository_abc import UserJoinedServerRepositoryABC @@ -25,7 +26,7 @@ class BaseOnVoiceStateUpdateEvent(OnVoiceStateUpdateABC): def __init__( self, config: ConfigurationABC, - logger: LoggerABC, + logger: EventLogger, servers: ServerRepositoryABC, known_users: KnownUserRepositoryABC, users: UserRepositoryABC, diff --git a/bot/src/modules/base/events/base_on_voice_state_update_event_help_channel.py b/bot/src/modules/base/events/base_on_voice_state_update_event_help_channel.py index 8ae95da8..2fbf883b 100644 --- a/bot/src/modules/base/events/base_on_voice_state_update_event_help_channel.py +++ b/bot/src/modules/base/events/base_on_voice_state_update_event_help_channel.py @@ -6,6 +6,7 @@ from cpl_translation import TranslatePipe from bot_core.abc.message_service_abc import MessageServiceABC from bot_core.helper.event_checks import EventChecks +from bot_core.logging.event_logger import EventLogger from bot_data.abc.server_repository_abc import ServerRepositoryABC from bot_data.model.server_config import ServerConfig from bot_core.abc.permission_service_abc import PermissionServiceABC @@ -15,7 +16,7 @@ class BaseOnVoiceStateUpdateEventHelpChannel(OnVoiceStateUpdateABC): def __init__( self, config: ConfigurationABC, - logger: LoggerABC, + logger: EventLogger, servers: ServerRepositoryABC, permissions: PermissionServiceABC, message_service: MessageServiceABC, diff --git a/bot/src/modules/base/events/base_on_voice_state_update_event_scheduled_event_bonus.py b/bot/src/modules/base/events/base_on_voice_state_update_event_scheduled_event_bonus.py index b18af00b..ae20bfae 100644 --- a/bot/src/modules/base/events/base_on_voice_state_update_event_scheduled_event_bonus.py +++ b/bot/src/modules/base/events/base_on_voice_state_update_event_scheduled_event_bonus.py @@ -5,6 +5,7 @@ from cpl_core.logging import LoggerABC from cpl_discord.events import OnVoiceStateUpdateABC from bot_core.helper.event_checks import EventChecks +from bot_core.logging.event_logger import EventLogger from bot_data.abc.server_repository_abc import ServerRepositoryABC from bot_data.abc.user_repository_abc import UserRepositoryABC from modules.base.service.event_service import EventService @@ -14,7 +15,7 @@ class BaseOnVoiceStateUpdateEventScheduledEventBonus(OnVoiceStateUpdateABC): def __init__( self, config: ConfigurationABC, - logger: LoggerABC, + logger: EventLogger, servers: ServerRepositoryABC, users: UserRepositoryABC, events: EventService, diff --git a/bot/src/modules/boot_log/boot_log_on_ready_event.py b/bot/src/modules/boot_log/boot_log_on_ready_event.py index 0c5161fd..9889dc18 100644 --- a/bot/src/modules/boot_log/boot_log_on_ready_event.py +++ b/bot/src/modules/boot_log/boot_log_on_ready_event.py @@ -10,6 +10,7 @@ from discord import guild from bot_core.abc.message_service_abc import MessageServiceABC from bot_core.configuration.feature_flags_enum import FeatureFlagsEnum from bot_core.configuration.feature_flags_settings import FeatureFlagsSettings +from bot_core.logging.event_logger import EventLogger from bot_data.model.server_config import ServerConfig from bot_data.model.technician_config import TechnicianConfig @@ -18,7 +19,7 @@ class BootLogOnReadyEvent(OnReadyABC): def __init__( self, config: ConfigurationABC, - logger: LoggerABC, + logger: EventLogger, bot: DiscordBotServiceABC, message_service: MessageServiceABC, translate: TranslatePipe, diff --git a/bot/src/modules/config/events/config_on_ready_event.py b/bot/src/modules/config/events/config_on_ready_event.py index 699063d6..8b7f1a67 100644 --- a/bot/src/modules/config/events/config_on_ready_event.py +++ b/bot/src/modules/config/events/config_on_ready_event.py @@ -1,8 +1,8 @@ from cpl_core.configuration import ConfigurationABC -from cpl_core.logging import LoggerABC from cpl_discord.events import OnReadyABC from cpl_discord.service import DiscordBotServiceABC +from bot_core.logging.event_logger import EventLogger from bot_core.service.config_service import ConfigService from bot_core.service.data_integrity_service import DataIntegrityService from bot_data.abc.server_repository_abc import ServerRepositoryABC @@ -12,7 +12,7 @@ class ConfigOnReadyEvent(OnReadyABC): def __init__( self, config: ConfigurationABC, - logger: LoggerABC, + logger: EventLogger, bot: DiscordBotServiceABC, servers: ServerRepositoryABC, config_service: ConfigService, diff --git a/bot/src/modules/level/events/level_on_member_join_event.py b/bot/src/modules/level/events/level_on_member_join_event.py index 38326ed3..40428732 100644 --- a/bot/src/modules/level/events/level_on_member_join_event.py +++ b/bot/src/modules/level/events/level_on_member_join_event.py @@ -5,13 +5,14 @@ from cpl_discord.events import OnMemberJoinABC from bot_core.configuration.feature_flags_enum import FeatureFlagsEnum from bot_core.configuration.feature_flags_settings import FeatureFlagsSettings from bot_core.helper.event_checks import EventChecks +from bot_core.logging.event_logger import EventLogger from bot_core.logging.message_logger import MessageLogger from bot_data.model.server_config import ServerConfig from modules.level.service.level_service import LevelService class LevelOnMemberJoinEvent(OnMemberJoinABC): - def __init__(self, config: ConfigurationABC, logger: MessageLogger, level: LevelService): + def __init__(self, config: ConfigurationABC, logger: EventLogger, level: LevelService): OnMemberJoinABC.__init__(self) self._config = config self._logger = logger diff --git a/bot/src/modules/level/events/level_on_raw_reaction_add_event.py b/bot/src/modules/level/events/level_on_raw_reaction_add_event.py index 341a0a21..259910f7 100644 --- a/bot/src/modules/level/events/level_on_raw_reaction_add_event.py +++ b/bot/src/modules/level/events/level_on_raw_reaction_add_event.py @@ -7,6 +7,7 @@ from discord import RawReactionActionEvent from bot_core.configuration.feature_flags_enum import FeatureFlagsEnum from bot_core.configuration.feature_flags_settings import FeatureFlagsSettings from bot_core.helper.event_checks import EventChecks +from bot_core.logging.event_logger import EventLogger from bot_data.model.server_config import ServerConfig from modules.level.service.level_service import LevelService @@ -15,7 +16,7 @@ class LevelOnRawReactionAddEvent(OnRawReactionAddABC): def __init__( self, config: ConfigurationABC, - logger: LoggerABC, + logger: EventLogger, bot: DiscordBotServiceABC, level: LevelService, ): diff --git a/bot/src/modules/level/events/level_on_raw_reaction_remove_event.py b/bot/src/modules/level/events/level_on_raw_reaction_remove_event.py index 1c04f19b..d44cf96d 100644 --- a/bot/src/modules/level/events/level_on_raw_reaction_remove_event.py +++ b/bot/src/modules/level/events/level_on_raw_reaction_remove_event.py @@ -7,6 +7,7 @@ from discord import RawReactionActionEvent from bot_core.configuration.feature_flags_enum import FeatureFlagsEnum from bot_core.configuration.feature_flags_settings import FeatureFlagsSettings from bot_core.helper.event_checks import EventChecks +from bot_core.logging.event_logger import EventLogger from bot_data.model.server_config import ServerConfig from modules.level.service.level_service import LevelService @@ -15,7 +16,7 @@ class LevelOnRawReactionRemoveEvent(OnRawReactionRemoveABC): def __init__( self, config: ConfigurationABC, - logger: LoggerABC, + logger: EventLogger, bot: DiscordBotServiceABC, level: LevelService, ): diff --git a/bot/src/modules/level/events/level_on_voice_state_update_event.py b/bot/src/modules/level/events/level_on_voice_state_update_event.py index f9bb2bf2..079b2ffe 100644 --- a/bot/src/modules/level/events/level_on_voice_state_update_event.py +++ b/bot/src/modules/level/events/level_on_voice_state_update_event.py @@ -6,12 +6,13 @@ from cpl_discord.events import OnVoiceStateUpdateABC from bot_core.configuration.feature_flags_enum import FeatureFlagsEnum from bot_core.configuration.feature_flags_settings import FeatureFlagsSettings from bot_core.helper.event_checks import EventChecks +from bot_core.logging.event_logger import EventLogger from bot_data.model.server_config import ServerConfig from modules.level.service.level_service import LevelService class LevelOnVoiceStateUpdateEvent(OnVoiceStateUpdateABC): - def __init__(self, config: ConfigurationABC, logger: LoggerABC, level: LevelService): + def __init__(self, config: ConfigurationABC, logger: EventLogger, level: LevelService): OnVoiceStateUpdateABC.__init__(self) self._config = config self._logger = logger -- 2.45.2 From ad3fc94923c807b1ac604f0f672c2ac73bc01758 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 9 Dec 2023 13:58:38 +0100 Subject: [PATCH 02/30] Improved logging for event_service --- bot/src/modules/base/service/event_service.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bot/src/modules/base/service/event_service.py b/bot/src/modules/base/service/event_service.py index 63066353..ae48756f 100644 --- a/bot/src/modules/base/service/event_service.py +++ b/bot/src/modules/base/service/event_service.py @@ -99,6 +99,7 @@ class EventService: async def check_and_create_scheduled_events(self, guild: Guild): server = self._servers.get_server_by_discord_id(guild.id) scheduled_events_from_db = self._events.get_scheduled_events_by_server_id(server.id) + self._logger.debug(__name__, f"Checking {scheduled_events_from_db.count()} events for server {guild.id}") for scheduled_event in scheduled_events_from_db: scheduled_event: ScheduledEvent = scheduled_event from_guild = List(DiscordEvent, guild.scheduled_events).where( @@ -107,6 +108,7 @@ class EventService: and x.entity_type == scheduled_event.entity_type ) if from_guild.count() != 0: + self._logger.debug(__name__, f"Event {scheduled_event.name} already exists on discord server") continue kwargs = {"name": scheduled_event.name, "description": scheduled_event.description} @@ -135,9 +137,10 @@ class EventService: kwargs["privacy_level"] = PrivacyLevel.guild_only try: - self._logger.debug(__name__, f"Try to create scheduled event for guild {guild.name}") + self._logger.trace(__name__, f"Try to create scheduled event for guild {guild.name}") await guild.create_scheduled_event(**kwargs) self._events.update_scheduled_event(scheduled_event) self._db.save_changes() + self._logger.debug(__name__, f"Created scheduled event for guild {guild.name}") except Exception as e: self._logger.error(__name__, f"Watching scheduled events failed", e) -- 2.45.2 From 0706579f62c74c8932217eaaae72ee54d681ebd6 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 9 Dec 2023 14:05:35 +0100 Subject: [PATCH 03/30] Fixed set timestamp for scheduled events #456 --- bot/src/modules/base/service/event_service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/src/modules/base/service/event_service.py b/bot/src/modules/base/service/event_service.py index ae48756f..51298b3c 100644 --- a/bot/src/modules/base/service/event_service.py +++ b/bot/src/modules/base/service/event_service.py @@ -121,14 +121,14 @@ class EventService: scheduled_event.interval, scheduled_event.start_time.replace(tzinfo=ZoneInfo("Europe/Berlin")) ) kwargs["start_time"] = start_time - scheduled_event.start_time = scheduled_event.start_time.replace(tzinfo=None) + scheduled_event.start_time = start_time.replace(tzinfo=None) if scheduled_event.end_time is not None: end_time = self._append_interval( scheduled_event.interval, scheduled_event.end_time.replace(tzinfo=ZoneInfo("Europe/Berlin")) ) kwargs["end_time"] = end_time - scheduled_event.end_time = scheduled_event.end_time.replace(tzinfo=None) + scheduled_event.end_time = end_time.replace(tzinfo=None) kwargs["entity_type"] = scheduled_event.entity_type if scheduled_event.location is not None: -- 2.45.2 From e3172d6f24eede36def3b0efb48eec69617a2b9d Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 9 Dec 2023 14:11:34 +0100 Subject: [PATCH 04/30] Fixed event logger --- bot/src/bot_core/logging/event_logger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/src/bot_core/logging/event_logger.py b/bot/src/bot_core/logging/event_logger.py index 28fdde12..31890cf7 100644 --- a/bot/src/bot_core/logging/event_logger.py +++ b/bot/src/bot_core/logging/event_logger.py @@ -12,4 +12,4 @@ class EventLogger(CustomFileLoggerABC): time_format: TimeFormatSettings, env: ApplicationEnvironmentABC, ): - CustomFileLoggerABC.__init__(self, "Task", config, time_format, env) + CustomFileLoggerABC.__init__(self, "Event", config, time_format, env) -- 2.45.2 From af9c55e4b16c4f540e62853e10549a0946458faf Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 9 Dec 2023 20:59:31 +0100 Subject: [PATCH 05/30] Updated dev action --- .gitea/workflows/deploy_dev.yaml | 87 +++++++++++++++++++++++++------- 1 file changed, 69 insertions(+), 18 deletions(-) diff --git a/.gitea/workflows/deploy_dev.yaml b/.gitea/workflows/deploy_dev.yaml index 97b6c4d1..4a2ede6b 100644 --- a/.gitea/workflows/deploy_dev.yaml +++ b/.gitea/workflows/deploy_dev.yaml @@ -6,9 +6,17 @@ on: - dev jobs: - on-push-deploy_sh-edraft: + pre-build: runs-on: [ dobby.sh-edraft.de, ubuntu-latest ] - container: sh-edraft.de/act-runner:latest + container: git.sh-edraft.de/sh-edraft.de/act-runner:latest + steps: + - name: Shutdown stack + run: docker stack rm sdb_dev + + build-bot: + needs: pre-build + runs-on: [ dobby.sh-edraft.de, ubuntu-latest ] + container: git.sh-edraft.de/sh-edraft.de/act-runner:latest steps: - name: Setup docker uses: https://github.com/papodaca/install-docker-action@main @@ -20,12 +28,56 @@ jobs: token: ${{ secrets.CI_ACCESS_TOKEN }} submodules: true + - name: Set version + run: | + cd bot/docker + chmod +x ./set-docker-compose-image-version.sh + ./set-docker-compose-image-version.sh sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-dev sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-dev + - name: Prepare bot build run: | cd bot python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli cpl i + - name: Build docker bot + run: | + cd bot + docker image prune -f + cpl build + docker build -t git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cpl gv)-dev . + + - name: Login to registry git.sh-edraft.de + uses: https://github.com/docker/login-action@v1 + with: + registry: git.sh-edraft.de + username: ${{ secrets.CI_USERNAME }} + password: ${{ secrets.CI_ACCESS_TOKEN }} + + - name: Push image + run: docker push git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cpl gv)-dev + + build-web: + needs: pre-build + runs-on: [ dobby.sh-edraft.de, ubuntu-latest ] + container: git.sh-edraft.de/sh-edraft.de/act-runner:latest + steps: + - name: Setup docker + uses: https://github.com/papodaca/install-docker-action@main + - run: docker -v + + - name: Clone Repository + uses: https://github.com/actions/checkout@v3 + with: + token: ${{ secrets.CI_ACCESS_TOKEN }} + submodules: true + + - name: Set version + run: | + cd bot/docker + chmod +x ./set-docker-compose-image-version.sh + ./set-docker-compose-image-version.sh sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-dev sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-dev + - name: Setup node uses: https://github.com/actions/setup-node@v3 @@ -35,30 +87,29 @@ jobs: npm install -g ts-node npm ci - - name: Shutdown stack - run: docker stack rm sdb_dev - - - name: Build docker bot - run: | - cd bot - docker image prune -f - cpl build - docker build -t sh-edraft.de/sdb-bot:$(cpl gv)-dev . - - name: Build docker web run: | cd web docker image prune -f cp src/favicon.dev.ico src/favicon.ico npm run build - docker build -t sh-edraft.de/sdb-web:$(npm run -s gv)-dev . + docker build -t git.sh-edraft.de/sh-edraft.de/sdb-web:$(npm run -s gv)-dev . - - name: Set version - run: | - cd bot/docker - chmod +x ./set-docker-compose-image-version.sh - ./set-docker-compose-image-version.sh sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-dev sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-dev + - name: Login to registry git.sh-edraft.de + uses: https://github.com/docker/login-action@v1 + with: + registry: git.sh-edraft.de + username: ${{ secrets.CI_USERNAME }} + password: ${{ secrets.CI_ACCESS_TOKEN }} + - name: Push image + run: docker build -t git.sh-edraft.de/sh-edraft.de/sdb-web:$(npm run -s gv)-dev + + deploy: + needs: [ build-bot, build-web ] + runs-on: [ dobby.sh-edraft.de, ubuntu-latest ] + container: git.sh-edraft.de/sh-edraft.de/act-runner:latest + steps: - name: Deploy Stack to sh-edraft.de uses: https://github.com/kgierke/portainer-stack-deployment@v1 with: -- 2.45.2 From d4f4f39522fed577cd64ff7432f1753b04b3074d Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 9 Dec 2023 21:22:00 +0100 Subject: [PATCH 06/30] Fixed dev action --- .gitea/workflows/deploy_dev.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy_dev.yaml b/.gitea/workflows/deploy_dev.yaml index 4a2ede6b..0b9aaaf1 100644 --- a/.gitea/workflows/deploy_dev.yaml +++ b/.gitea/workflows/deploy_dev.yaml @@ -103,7 +103,7 @@ jobs: password: ${{ secrets.CI_ACCESS_TOKEN }} - name: Push image - run: docker build -t git.sh-edraft.de/sh-edraft.de/sdb-web:$(npm run -s gv)-dev + run: docker push git.sh-edraft.de/sh-edraft.de/sdb-web:$(npm run -s gv)-dev deploy: needs: [ build-bot, build-web ] -- 2.45.2 From 7e3975f4be03b9ee4a24c342ae8ab60e9378a9c6 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 9 Dec 2023 21:28:15 +0100 Subject: [PATCH 07/30] Fixed dev action --- .gitea/workflows/deploy_dev.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy_dev.yaml b/.gitea/workflows/deploy_dev.yaml index 0b9aaaf1..aa826338 100644 --- a/.gitea/workflows/deploy_dev.yaml +++ b/.gitea/workflows/deploy_dev.yaml @@ -55,7 +55,9 @@ jobs: password: ${{ secrets.CI_ACCESS_TOKEN }} - name: Push image - run: docker push git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cpl gv)-dev + run: | + cd bot + docker push git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cpl gv)-dev build-web: needs: pre-build @@ -103,7 +105,9 @@ jobs: password: ${{ secrets.CI_ACCESS_TOKEN }} - name: Push image - run: docker push git.sh-edraft.de/sh-edraft.de/sdb-web:$(npm run -s gv)-dev + run: | + cd web + docker push git.sh-edraft.de/sh-edraft.de/sdb-web:$(npm run -s gv)-dev deploy: needs: [ build-bot, build-web ] -- 2.45.2 From 711e1848955e8decc4144c7b950e9c9d18bc4759 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 9 Dec 2023 21:34:21 +0100 Subject: [PATCH 08/30] Fixed dev action --- .gitea/workflows/deploy_dev.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitea/workflows/deploy_dev.yaml b/.gitea/workflows/deploy_dev.yaml index aa826338..1b36ccab 100644 --- a/.gitea/workflows/deploy_dev.yaml +++ b/.gitea/workflows/deploy_dev.yaml @@ -114,6 +114,12 @@ jobs: runs-on: [ dobby.sh-edraft.de, ubuntu-latest ] container: git.sh-edraft.de/sh-edraft.de/act-runner:latest steps: + - name: Clone Repository + uses: https://github.com/actions/checkout@v3 + with: + token: ${{ secrets.CI_ACCESS_TOKEN }} + submodules: true + - name: Deploy Stack to sh-edraft.de uses: https://github.com/kgierke/portainer-stack-deployment@v1 with: -- 2.45.2 From 3f13f65932ac869ccb9f554fe16ff7bfc6533956 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 9 Dec 2023 21:43:34 +0100 Subject: [PATCH 09/30] Updated other env actions --- .gitea/workflows/deploy_prod.yaml | 96 ++++++++++++++++++++++----- .gitea/workflows/deploy_staging.yaml | 97 ++++++++++++++++++++++------ 2 files changed, 158 insertions(+), 35 deletions(-) diff --git a/.gitea/workflows/deploy_prod.yaml b/.gitea/workflows/deploy_prod.yaml index 1a4fb6dd..9e220db2 100644 --- a/.gitea/workflows/deploy_prod.yaml +++ b/.gitea/workflows/deploy_prod.yaml @@ -6,9 +6,17 @@ on: - master jobs: - on-push-deploy_sh-edraft: + pre-build: runs-on: [ dobby.sh-edraft.de, ubuntu-latest ] - container: sh-edraft.de/act-runner:latest + container: git.sh-edraft.de/sh-edraft.de/act-runner:latest + steps: + - name: Shutdown stack + run: docker stack rm sdb_prod + + build-bot: + needs: pre-build + runs-on: [ dobby.sh-edraft.de, ubuntu-latest ] + container: git.sh-edraft.de/sh-edraft.de/act-runner:latest steps: - name: Setup docker uses: https://github.com/papodaca/install-docker-action@main @@ -20,12 +28,58 @@ jobs: token: ${{ secrets.CI_ACCESS_TOKEN }} submodules: true + - name: Set version + run: | + cd bot/docker + chmod +x ./set-docker-compose-image-version.sh + ./set-docker-compose-image-version.sh sh-edraft.de/sdb-bot:$(cd ../; cpl gv) sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;) + - name: Prepare bot build run: | cd bot python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli cpl i + - name: Build docker bot + run: | + cd bot + docker image prune -f + cpl build + docker build -t git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cpl gv) . + + - name: Login to registry git.sh-edraft.de + uses: https://github.com/docker/login-action@v1 + with: + registry: git.sh-edraft.de + username: ${{ secrets.CI_USERNAME }} + password: ${{ secrets.CI_ACCESS_TOKEN }} + + - name: Push image + run: | + cd bot + docker push git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cpl gv) + + build-web: + needs: pre-build + runs-on: [ dobby.sh-edraft.de, ubuntu-latest ] + container: git.sh-edraft.de/sh-edraft.de/act-runner:latest + steps: + - name: Setup docker + uses: https://github.com/papodaca/install-docker-action@main + - run: docker -v + + - name: Clone Repository + uses: https://github.com/actions/checkout@v3 + with: + token: ${{ secrets.CI_ACCESS_TOKEN }} + submodules: true + + - name: Set version + run: | + cd bot/docker + chmod +x ./set-docker-compose-image-version.sh + ./set-docker-compose-image-version.sh sh-edraft.de/sdb-bot:$(cd ../; cpl gv) sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;) + - name: Setup node uses: https://github.com/actions/setup-node@v3 @@ -35,28 +89,36 @@ jobs: npm install -g ts-node npm ci - - name: Shutdown stack - run: docker stack rm sdb_prod - - - name: Build docker bot - run: | - cd bot - docker image prune -f - cpl build - docker build -t sh-edraft.de/sdb-bot:$(cpl gv) . - - name: Build docker web run: | cd web docker image prune -f + cp src/favicon.ico src/favicon.ico npm run build - docker build -t sh-edraft.de/sdb-web:$(npm run -s gv) . + docker build -t git.sh-edraft.de/sh-edraft.de/sdb-web:$(npm run -s gv) . - - name: Set version + - name: Login to registry git.sh-edraft.de + uses: https://github.com/docker/login-action@v1 + with: + registry: git.sh-edraft.de + username: ${{ secrets.CI_USERNAME }} + password: ${{ secrets.CI_ACCESS_TOKEN }} + + - name: Push image run: | - cd bot/docker - chmod +x ./set-docker-compose-image-version.sh - ./set-docker-compose-image-version.sh sh-edraft.de/sdb-bot:$(cd ../; cpl gv) sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;) + cd web + docker push git.sh-edraft.de/sh-edraft.de/sdb-web:$(npm run -s gv) + + deploy: + needs: [ build-bot, build-web ] + runs-on: [ dobby.sh-edraft.de, ubuntu-latest ] + container: git.sh-edraft.de/sh-edraft.de/act-runner:latest + steps: + - name: Clone Repository + uses: https://github.com/actions/checkout@v3 + with: + token: ${{ secrets.CI_ACCESS_TOKEN }} + submodules: true - name: Deploy Stack to sh-edraft.de uses: https://github.com/kgierke/portainer-stack-deployment@v1 diff --git a/.gitea/workflows/deploy_staging.yaml b/.gitea/workflows/deploy_staging.yaml index f8bbd17a..b2f972d5 100644 --- a/.gitea/workflows/deploy_staging.yaml +++ b/.gitea/workflows/deploy_staging.yaml @@ -6,9 +6,17 @@ on: - staging jobs: - on-push-deploy_sh-edraft: + pre-build: runs-on: [ dobby.sh-edraft.de, ubuntu-latest ] - container: sh-edraft.de/act-runner:latest + container: git.sh-edraft.de/sh-edraft.de/act-runner:latest + steps: + - name: Shutdown stack + run: docker stack rm sdb_test + + build-bot: + needs: pre-build + runs-on: [ dobby.sh-edraft.de, ubuntu-latest ] + container: git.sh-edraft.de/sh-edraft.de/act-runner:latest steps: - name: Setup docker uses: https://github.com/papodaca/install-docker-action@main @@ -20,12 +28,58 @@ jobs: token: ${{ secrets.CI_ACCESS_TOKEN }} submodules: true + - name: Set version + run: | + cd bot/docker + chmod +x ./set-docker-compose-image-version.sh + ./set-docker-compose-image-version.sh sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-staging sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-staging + - name: Prepare bot build run: | cd bot python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli cpl i + - name: Build docker bot + run: | + cd bot + docker image prune -f + cpl build + docker build -t git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cpl gv)-staging . + + - name: Login to registry git.sh-edraft.de + uses: https://github.com/docker/login-action@v1 + with: + registry: git.sh-edraft.de + username: ${{ secrets.CI_USERNAME }} + password: ${{ secrets.CI_ACCESS_TOKEN }} + + - name: Push image + run: | + cd bot + docker push git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cpl gv)-staging + + build-web: + needs: pre-build + runs-on: [ dobby.sh-edraft.de, ubuntu-latest ] + container: git.sh-edraft.de/sh-edraft.de/act-runner:latest + steps: + - name: Setup docker + uses: https://github.com/papodaca/install-docker-action@main + - run: docker -v + + - name: Clone Repository + uses: https://github.com/actions/checkout@v3 + with: + token: ${{ secrets.CI_ACCESS_TOKEN }} + submodules: true + + - name: Set version + run: | + cd bot/docker + chmod +x ./set-docker-compose-image-version.sh + ./set-docker-compose-image-version.sh sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-staging sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-staging + - name: Setup node uses: https://github.com/actions/setup-node@v3 @@ -35,29 +89,36 @@ jobs: npm install -g ts-node npm ci - - name: Shutdown stack - run: docker stack rm sdb_staging - - - name: Build docker bot - run: | - cd bot - docker image prune -f - cpl build - docker build -t sh-edraft.de/sdb-bot:$(cpl gv)-staging . - - name: Build docker web run: | cd web docker image prune -f cp src/favicon.staging.ico src/favicon.ico npm run build - docker build -t sh-edraft.de/sdb-web:$(npm run -s gv)-staging . + docker build -t git.sh-edraft.de/sh-edraft.de/sdb-web:$(npm run -s gv)-staging . - - name: Set version + - name: Login to registry git.sh-edraft.de + uses: https://github.com/docker/login-action@v1 + with: + registry: git.sh-edraft.de + username: ${{ secrets.CI_USERNAME }} + password: ${{ secrets.CI_ACCESS_TOKEN }} + + - name: Push image run: | - cd bot/docker - chmod +x ./set-docker-compose-image-version.sh - ./set-docker-compose-image-version.sh sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-staging sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-staging + cd web + docker push git.sh-edraft.de/sh-edraft.de/sdb-web:$(npm run -s gv)-staging + + deploy: + needs: [ build-bot, build-web ] + runs-on: [ dobby.sh-edraft.de, ubuntu-latest ] + container: git.sh-edraft.de/sh-edraft.de/act-runner:latest + steps: + - name: Clone Repository + uses: https://github.com/actions/checkout@v3 + with: + token: ${{ secrets.CI_ACCESS_TOKEN }} + submodules: true - name: Deploy Stack to sh-edraft.de uses: https://github.com/kgierke/portainer-stack-deployment@v1 @@ -66,6 +127,6 @@ jobs: portainer-username: "gitea_job" portainer-password: "${{ secrets.docker_job }}" portainer-endpoint: 2 - name: sdb_staging + name: sdb_test file: bot/docker/docker-compose.staging.yml variables: '{}' -- 2.45.2 From 20bdb6bd982806e489bb0f0500d4f8407a3da15d Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 9 Dec 2023 21:46:01 +0100 Subject: [PATCH 10/30] Updated compose files --- bot/docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/docker b/bot/docker index abd17085..0d438a9a 160000 --- a/bot/docker +++ b/bot/docker @@ -1 +1 @@ -Subproject commit abd17085309242a2aa0b415a9a14d5390163dfc2 +Subproject commit 0d438a9a69b29c617e7d1568fb01b5a5ef18e324 -- 2.45.2 From b6a1172cc188b9d5e635b9edde273e3923d31db2 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 9 Dec 2023 21:51:47 +0100 Subject: [PATCH 11/30] Fixed actions --- bot/docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/docker b/bot/docker index 0d438a9a..36ed4305 160000 --- a/bot/docker +++ b/bot/docker @@ -1 +1 @@ -Subproject commit 0d438a9a69b29c617e7d1568fb01b5a5ef18e324 +Subproject commit 36ed43055df2979b5c4c486a161b1754803915cc -- 2.45.2 From 416353269610611525cf7be4515352ca1b501086 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 9 Dec 2023 22:02:57 +0100 Subject: [PATCH 12/30] Fixed actions --- .gitea/workflows/deploy_dev.yaml | 11 ++++++++--- .gitea/workflows/deploy_prod.yaml | 11 ++++++++--- .gitea/workflows/deploy_staging.yaml | 11 ++++++++--- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/deploy_dev.yaml b/.gitea/workflows/deploy_dev.yaml index 1b36ccab..7f6e13e3 100644 --- a/.gitea/workflows/deploy_dev.yaml +++ b/.gitea/workflows/deploy_dev.yaml @@ -28,16 +28,18 @@ jobs: token: ${{ secrets.CI_ACCESS_TOKEN }} submodules: true + - name: Install cpl + run: python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli + - name: Set version run: | cd bot/docker chmod +x ./set-docker-compose-image-version.sh - ./set-docker-compose-image-version.sh sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-dev sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-dev + ./set-docker-compose-image-version.sh git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-dev git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-dev - name: Prepare bot build run: | cd bot - python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli cpl i - name: Build docker bot @@ -74,11 +76,14 @@ jobs: token: ${{ secrets.CI_ACCESS_TOKEN }} submodules: true + - name: Install cpl + run: python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli + - name: Set version run: | cd bot/docker chmod +x ./set-docker-compose-image-version.sh - ./set-docker-compose-image-version.sh sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-dev sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-dev + ./set-docker-compose-image-version.sh git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-dev git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-dev - name: Setup node uses: https://github.com/actions/setup-node@v3 diff --git a/.gitea/workflows/deploy_prod.yaml b/.gitea/workflows/deploy_prod.yaml index 9e220db2..c900a7d4 100644 --- a/.gitea/workflows/deploy_prod.yaml +++ b/.gitea/workflows/deploy_prod.yaml @@ -28,16 +28,18 @@ jobs: token: ${{ secrets.CI_ACCESS_TOKEN }} submodules: true + - name: Install cpl + run: python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli + - name: Set version run: | cd bot/docker chmod +x ./set-docker-compose-image-version.sh - ./set-docker-compose-image-version.sh sh-edraft.de/sdb-bot:$(cd ../; cpl gv) sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;) + ./set-docker-compose-image-version.sh git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cd ../; cpl gv) git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;) - name: Prepare bot build run: | cd bot - python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli cpl i - name: Build docker bot @@ -74,11 +76,14 @@ jobs: token: ${{ secrets.CI_ACCESS_TOKEN }} submodules: true + - name: Install cpl + run: python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli + - name: Set version run: | cd bot/docker chmod +x ./set-docker-compose-image-version.sh - ./set-docker-compose-image-version.sh sh-edraft.de/sdb-bot:$(cd ../; cpl gv) sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;) + ./set-docker-compose-image-version.sh git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cd ../; cpl gv) git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;) - name: Setup node uses: https://github.com/actions/setup-node@v3 diff --git a/.gitea/workflows/deploy_staging.yaml b/.gitea/workflows/deploy_staging.yaml index b2f972d5..4a01b239 100644 --- a/.gitea/workflows/deploy_staging.yaml +++ b/.gitea/workflows/deploy_staging.yaml @@ -28,16 +28,18 @@ jobs: token: ${{ secrets.CI_ACCESS_TOKEN }} submodules: true + - name: Install cpl + run: python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli + - name: Set version run: | cd bot/docker chmod +x ./set-docker-compose-image-version.sh - ./set-docker-compose-image-version.sh sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-staging sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-staging + ./set-docker-compose-image-version.sh git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-staging git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-staging - name: Prepare bot build run: | cd bot - python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli cpl i - name: Build docker bot @@ -74,11 +76,14 @@ jobs: token: ${{ secrets.CI_ACCESS_TOKEN }} submodules: true + - name: Install cpl + run: python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli + - name: Set version run: | cd bot/docker chmod +x ./set-docker-compose-image-version.sh - ./set-docker-compose-image-version.sh sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-staging sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-staging + ./set-docker-compose-image-version.sh git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-staging git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-staging - name: Setup node uses: https://github.com/actions/setup-node@v3 -- 2.45.2 From 013f953a7ff76a5925d64a17daf0f51234e781d9 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 9 Dec 2023 22:10:04 +0100 Subject: [PATCH 13/30] Fixed actions --- .gitea/workflows/deploy_dev.yaml | 16 ++++++++++------ .gitea/workflows/deploy_prod.yaml | 28 ++++++++++------------------ .gitea/workflows/deploy_staging.yaml | 16 ++++++++++------ 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.gitea/workflows/deploy_dev.yaml b/.gitea/workflows/deploy_dev.yaml index 7f6e13e3..1466204b 100644 --- a/.gitea/workflows/deploy_dev.yaml +++ b/.gitea/workflows/deploy_dev.yaml @@ -28,9 +28,6 @@ jobs: token: ${{ secrets.CI_ACCESS_TOKEN }} submodules: true - - name: Install cpl - run: python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli - - name: Set version run: | cd bot/docker @@ -39,6 +36,7 @@ jobs: - name: Prepare bot build run: | + python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli cd bot cpl i @@ -76,9 +74,6 @@ jobs: token: ${{ secrets.CI_ACCESS_TOKEN }} submodules: true - - name: Install cpl - run: python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli - - name: Set version run: | cd bot/docker @@ -125,6 +120,15 @@ jobs: token: ${{ secrets.CI_ACCESS_TOKEN }} submodules: true + - name: Install cpl + run: python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli + + - name: Set version + run: | + cd bot/docker + chmod +x ./set-docker-compose-image-version.sh + ./set-docker-compose-image-version.sh git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cd ../; cpl gv) git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;) + - name: Deploy Stack to sh-edraft.de uses: https://github.com/kgierke/portainer-stack-deployment@v1 with: diff --git a/.gitea/workflows/deploy_prod.yaml b/.gitea/workflows/deploy_prod.yaml index c900a7d4..09566db7 100644 --- a/.gitea/workflows/deploy_prod.yaml +++ b/.gitea/workflows/deploy_prod.yaml @@ -28,17 +28,9 @@ jobs: token: ${{ secrets.CI_ACCESS_TOKEN }} submodules: true - - name: Install cpl - run: python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli - - - name: Set version - run: | - cd bot/docker - chmod +x ./set-docker-compose-image-version.sh - ./set-docker-compose-image-version.sh git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cd ../; cpl gv) git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;) - - name: Prepare bot build run: | + python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli cd bot cpl i @@ -76,15 +68,6 @@ jobs: token: ${{ secrets.CI_ACCESS_TOKEN }} submodules: true - - name: Install cpl - run: python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli - - - name: Set version - run: | - cd bot/docker - chmod +x ./set-docker-compose-image-version.sh - ./set-docker-compose-image-version.sh git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cd ../; cpl gv) git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;) - - name: Setup node uses: https://github.com/actions/setup-node@v3 @@ -125,6 +108,15 @@ jobs: token: ${{ secrets.CI_ACCESS_TOKEN }} submodules: true + - name: Install cpl + run: python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli + + - name: Set version + run: | + cd bot/docker + chmod +x ./set-docker-compose-image-version.sh + ./set-docker-compose-image-version.sh git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cd ../; cpl gv) git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;) + - name: Deploy Stack to sh-edraft.de uses: https://github.com/kgierke/portainer-stack-deployment@v1 with: diff --git a/.gitea/workflows/deploy_staging.yaml b/.gitea/workflows/deploy_staging.yaml index 4a01b239..98514415 100644 --- a/.gitea/workflows/deploy_staging.yaml +++ b/.gitea/workflows/deploy_staging.yaml @@ -28,9 +28,6 @@ jobs: token: ${{ secrets.CI_ACCESS_TOKEN }} submodules: true - - name: Install cpl - run: python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli - - name: Set version run: | cd bot/docker @@ -39,6 +36,7 @@ jobs: - name: Prepare bot build run: | + python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli cd bot cpl i @@ -76,9 +74,6 @@ jobs: token: ${{ secrets.CI_ACCESS_TOKEN }} submodules: true - - name: Install cpl - run: python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli - - name: Set version run: | cd bot/docker @@ -125,6 +120,15 @@ jobs: token: ${{ secrets.CI_ACCESS_TOKEN }} submodules: true + - name: Install cpl + run: python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli + + - name: Set version + run: | + cd bot/docker + chmod +x ./set-docker-compose-image-version.sh + ./set-docker-compose-image-version.sh git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cd ../; cpl gv) git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;) + - name: Deploy Stack to sh-edraft.de uses: https://github.com/kgierke/portainer-stack-deployment@v1 with: -- 2.45.2 From 7ed621a25b21851da35c9571f5bec8b571a32f48 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 9 Dec 2023 22:17:56 +0100 Subject: [PATCH 14/30] Fixed actions --- .gitea/workflows/deploy_dev.yaml | 2 +- .gitea/workflows/deploy_staging.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy_dev.yaml b/.gitea/workflows/deploy_dev.yaml index 1466204b..1fb38c5a 100644 --- a/.gitea/workflows/deploy_dev.yaml +++ b/.gitea/workflows/deploy_dev.yaml @@ -127,7 +127,7 @@ jobs: run: | cd bot/docker chmod +x ./set-docker-compose-image-version.sh - ./set-docker-compose-image-version.sh git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cd ../; cpl gv) git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;) + ./set-docker-compose-image-version.sh git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-dev git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-dev - name: Deploy Stack to sh-edraft.de uses: https://github.com/kgierke/portainer-stack-deployment@v1 diff --git a/.gitea/workflows/deploy_staging.yaml b/.gitea/workflows/deploy_staging.yaml index 98514415..007656f0 100644 --- a/.gitea/workflows/deploy_staging.yaml +++ b/.gitea/workflows/deploy_staging.yaml @@ -127,7 +127,7 @@ jobs: run: | cd bot/docker chmod +x ./set-docker-compose-image-version.sh - ./set-docker-compose-image-version.sh git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cd ../; cpl gv) git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;) + ./set-docker-compose-image-version.sh git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-staging git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-staging - name: Deploy Stack to sh-edraft.de uses: https://github.com/kgierke/portainer-stack-deployment@v1 -- 2.45.2 From af891fa588230bb5f359d90a400562664f63075f Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 9 Dec 2023 22:33:14 +0100 Subject: [PATCH 15/30] Fixed actions --- .gitea/workflows/deploy_dev.yaml | 12 ------------ .gitea/workflows/deploy_staging.yaml | 12 ------------ 2 files changed, 24 deletions(-) diff --git a/.gitea/workflows/deploy_dev.yaml b/.gitea/workflows/deploy_dev.yaml index 1fb38c5a..cb5e7902 100644 --- a/.gitea/workflows/deploy_dev.yaml +++ b/.gitea/workflows/deploy_dev.yaml @@ -28,12 +28,6 @@ jobs: token: ${{ secrets.CI_ACCESS_TOKEN }} submodules: true - - name: Set version - run: | - cd bot/docker - chmod +x ./set-docker-compose-image-version.sh - ./set-docker-compose-image-version.sh git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-dev git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-dev - - name: Prepare bot build run: | python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli @@ -74,12 +68,6 @@ jobs: token: ${{ secrets.CI_ACCESS_TOKEN }} submodules: true - - name: Set version - run: | - cd bot/docker - chmod +x ./set-docker-compose-image-version.sh - ./set-docker-compose-image-version.sh git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-dev git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-dev - - name: Setup node uses: https://github.com/actions/setup-node@v3 diff --git a/.gitea/workflows/deploy_staging.yaml b/.gitea/workflows/deploy_staging.yaml index 007656f0..f30fad95 100644 --- a/.gitea/workflows/deploy_staging.yaml +++ b/.gitea/workflows/deploy_staging.yaml @@ -28,12 +28,6 @@ jobs: token: ${{ secrets.CI_ACCESS_TOKEN }} submodules: true - - name: Set version - run: | - cd bot/docker - chmod +x ./set-docker-compose-image-version.sh - ./set-docker-compose-image-version.sh git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-staging git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-staging - - name: Prepare bot build run: | python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli @@ -74,12 +68,6 @@ jobs: token: ${{ secrets.CI_ACCESS_TOKEN }} submodules: true - - name: Set version - run: | - cd bot/docker - chmod +x ./set-docker-compose-image-version.sh - ./set-docker-compose-image-version.sh git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-staging git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-staging - - name: Setup node uses: https://github.com/actions/setup-node@v3 -- 2.45.2 From 4a75635a55e7a57cbd314f97a801aae35e2da35a Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 9 Dec 2023 22:48:37 +0100 Subject: [PATCH 16/30] Fixed actions --- .gitea/workflows/deploy_staging.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy_staging.yaml b/.gitea/workflows/deploy_staging.yaml index f30fad95..530b181f 100644 --- a/.gitea/workflows/deploy_staging.yaml +++ b/.gitea/workflows/deploy_staging.yaml @@ -124,6 +124,6 @@ jobs: portainer-username: "gitea_job" portainer-password: "${{ secrets.docker_job }}" portainer-endpoint: 2 - name: sdb_test + name: sdb_staging file: bot/docker/docker-compose.staging.yml variables: '{}' -- 2.45.2 From dfb6751bf9f262e821abe97dcc9cc3c94a697ef8 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sun, 10 Dec 2023 11:18:30 +0100 Subject: [PATCH 17/30] Set event watcher loop from 12 to 3 hours --- bot/src/modules/base/tasks/scheduled_events_watcher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/src/modules/base/tasks/scheduled_events_watcher.py b/bot/src/modules/base/tasks/scheduled_events_watcher.py index e692d163..a9fad51d 100644 --- a/bot/src/modules/base/tasks/scheduled_events_watcher.py +++ b/bot/src/modules/base/tasks/scheduled_events_watcher.py @@ -37,7 +37,7 @@ class ScheduledEventsWatcher(TaskABC): if not self._is_maintenance(): self.watch.start() - @tasks.loop(hours=12) + @tasks.loop(hours=3) async def watch(self): self._logger.info(__name__, "Watching scheduled events") try: -- 2.45.2 From 39299eb11bbafd7c475b9e631ab3ee19e318ae48 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sun, 10 Dec 2023 13:13:24 +0100 Subject: [PATCH 18/30] Made watchers transient --- bot/src/modules/base/base_module.py | 4 ++-- bot/src/modules/base/tasks/birthday_watcher.py | 2 +- bot/src/modules/base/tasks/scheduled_events_watcher.py | 2 +- bot/src/modules/special_offers/special_offers_module.py | 2 +- bot/src/modules/special_offers/steam_offer_watcher.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bot/src/modules/base/base_module.py b/bot/src/modules/base/base_module.py index ca6b6356..53ed3c71 100644 --- a/bot/src/modules/base/base_module.py +++ b/bot/src/modules/base/base_module.py @@ -62,8 +62,8 @@ class BaseModule(ModuleABC): services.add_transient(BaseReactionHandler) services.add_singleton(EventService) services.add_transient(UserWarningsService) - services.add_singleton(TaskABC, BirthdayWatcher) - services.add_singleton(TaskABC, ScheduledEventsWatcher) + services.add_transient(TaskABC, BirthdayWatcher) + services.add_transient(TaskABC, ScheduledEventsWatcher) # forms services.add_transient(BugReportForm) diff --git a/bot/src/modules/base/tasks/birthday_watcher.py b/bot/src/modules/base/tasks/birthday_watcher.py index 50015415..9e3f6f35 100644 --- a/bot/src/modules/base/tasks/birthday_watcher.py +++ b/bot/src/modules/base/tasks/birthday_watcher.py @@ -37,7 +37,7 @@ class BirthdayWatcher(TaskABC): if not self._is_maintenance(): self.watch.start() - @tasks.loop(time=datetime.time(hour=8, minute=0)) + @tasks.loop(time=datetime.time(hour=8, minute=0), reconnect=True) async def watch(self): self._logger.info(__name__, "Watching birthdays") try: diff --git a/bot/src/modules/base/tasks/scheduled_events_watcher.py b/bot/src/modules/base/tasks/scheduled_events_watcher.py index a9fad51d..0af433e5 100644 --- a/bot/src/modules/base/tasks/scheduled_events_watcher.py +++ b/bot/src/modules/base/tasks/scheduled_events_watcher.py @@ -37,7 +37,7 @@ class ScheduledEventsWatcher(TaskABC): if not self._is_maintenance(): self.watch.start() - @tasks.loop(hours=3) + @tasks.loop(hours=3, reconnect=True) async def watch(self): self._logger.info(__name__, "Watching scheduled events") try: diff --git a/bot/src/modules/special_offers/special_offers_module.py b/bot/src/modules/special_offers/special_offers_module.py index e64108b5..4609ffe2 100644 --- a/bot/src/modules/special_offers/special_offers_module.py +++ b/bot/src/modules/special_offers/special_offers_module.py @@ -17,6 +17,6 @@ class SteamSpecialOffersModule(ModuleABC): pass def configure_services(self, services: ServiceCollectionABC, env: ApplicationEnvironmentABC): - services.add_singleton(TaskABC, SteamOfferWatcher) + services.add_transient(TaskABC, SteamOfferWatcher) # commands # events diff --git a/bot/src/modules/special_offers/steam_offer_watcher.py b/bot/src/modules/special_offers/steam_offer_watcher.py index d2af2b4d..0486573a 100644 --- a/bot/src/modules/special_offers/steam_offer_watcher.py +++ b/bot/src/modules/special_offers/steam_offer_watcher.py @@ -187,7 +187,7 @@ class SteamOfferWatcher(TaskABC): self._logger.trace(__name__, "Finished watching") return offers_for_notifications - @tasks.loop(hours=4) + @tasks.loop(hours=4, reconnect=True) async def watch(self): self._logger.info(__name__, "Watching steam special offers") try: -- 2.45.2 From dfdf0555d7b43cdcd50a7cd866d97457aa59d096 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sun, 10 Dec 2023 17:08:26 +0100 Subject: [PATCH 19/30] Added feature flag check for scheduled events #455 --- .../base/command/scheduled_events_group.py | 18 ++++++++++++++++++ .../base/tasks/scheduled_events_watcher.py | 10 ++++++++++ 2 files changed, 28 insertions(+) diff --git a/bot/src/modules/base/command/scheduled_events_group.py b/bot/src/modules/base/command/scheduled_events_group.py index 0d3653d4..83a6319d 100644 --- a/bot/src/modules/base/command/scheduled_events_group.py +++ b/bot/src/modules/base/command/scheduled_events_group.py @@ -1,22 +1,34 @@ +from cpl_core.configuration import ConfigurationABC from cpl_discord.command import DiscordCommandABC +from cpl_translation import TranslatePipe from discord.ext import commands from discord.ext.commands import Context +from bot_core.configuration.feature_flags_enum import FeatureFlagsEnum +from bot_core.configuration.feature_flags_settings import FeatureFlagsSettings from bot_core.helper.command_checks import CommandChecks from bot_core.logging.command_logger import CommandLogger +from bot_core.service.message_service import MessageService +from bot_data.model.server_config import ServerConfig from modules.base.service.event_service import EventService class ScheduledEventsCommand(DiscordCommandABC): def __init__( self, + config: ConfigurationABC, logger: CommandLogger, events: EventService, + message_service: MessageService, + t: TranslatePipe, ): DiscordCommandABC.__init__(self) + self._config = config self._logger = logger self._events = events + self._message_service = message_service + self._t = t self._logger.trace(__name__, f"Loaded command service: {type(self).__name__}") @@ -30,6 +42,12 @@ class ScheduledEventsCommand(DiscordCommandABC): @CommandChecks.check_is_ready() @CommandChecks.check_is_member_moderator() async def reload(self, ctx: Context): + settings: ServerConfig = self._config.get_configuration(f"ServerConfig_{ctx.guild.id}") + if not FeatureFlagsSettings.get_flag_from_dict(settings.feature_flags, FeatureFlagsEnum.scheduled_events): + self._logger.debug(__name__, f"Skipping scheduled event check for {ctx.guild.id}. Feature is disabled.") + await self._message_service.send_ctx_msg(ctx, self._t.transform("common.feature_not_activated")) + return + self._logger.debug(__name__, "Running scheduled-events reload") try: await self._events.check_and_create_scheduled_events(ctx.guild) diff --git a/bot/src/modules/base/tasks/scheduled_events_watcher.py b/bot/src/modules/base/tasks/scheduled_events_watcher.py index 0af433e5..c0839dc7 100644 --- a/bot/src/modules/base/tasks/scheduled_events_watcher.py +++ b/bot/src/modules/base/tasks/scheduled_events_watcher.py @@ -5,9 +5,12 @@ from cpl_translation import TranslatePipe from discord.ext import tasks from bot_core.abc.task_abc import TaskABC +from bot_core.configuration.feature_flags_enum import FeatureFlagsEnum +from bot_core.configuration.feature_flags_settings import FeatureFlagsSettings from bot_core.logging.task_logger import TaskLogger from bot_core.service.message_service import MessageService from bot_data.abc.server_repository_abc import ServerRepositoryABC +from bot_data.model.server_config import ServerConfig from modules.base.service.event_service import EventService @@ -42,6 +45,13 @@ class ScheduledEventsWatcher(TaskABC): self._logger.info(__name__, "Watching scheduled events") try: for guild in self._bot.guilds: + settings: ServerConfig = self._config.get_configuration(f"ServerConfig_{guild.id}") + if not FeatureFlagsSettings.get_flag_from_dict( + settings.feature_flags, FeatureFlagsEnum.scheduled_events + ): + self._logger.debug(__name__, f"Skipping scheduled event check for {guild.id}. Feature is disabled.") + continue + await self._events.check_and_create_scheduled_events(guild) except Exception as e: self._logger.error(__name__, f"Watching scheduled events failed", e) -- 2.45.2 From 13bc38fea84370dad54831ccef0b49155175db6b Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sun, 10 Dec 2023 19:00:00 +0100 Subject: [PATCH 20/30] Updated profile #409 --- bot/src/bot_data/model/user.py | 7 + bot/src/bot_graphql/graphql/user.gql | 2 + bot/src/bot_graphql/queries/user_query.py | 1 + web/src/app/models/data/user.model.ts | 2 + web/src/app/models/graphql/queries.model.ts | 1 + web/src/app/modules/shared/shared.module.ts | 4 +- .../server/profile/profile.component.html | 182 ++++++++---------- .../server/profile/profile.component.scss | 6 + .../view/server/profile/profile.component.ts | 30 ++- web/src/assets/i18n/de.json | 1 + web/src/assets/i18n/en.json | 1 + web/src/styles.scss | 60 +++--- .../styles/themes/sh-edraft-dark-theme.scss | 18 ++ 13 files changed, 177 insertions(+), 138 deletions(-) diff --git a/bot/src/bot_data/model/user.py b/bot/src/bot_data/model/user.py index bfb65ae6..bfc7be34 100644 --- a/bot/src/bot_data/model/user.py +++ b/bot/src/bot_data/model/user.py @@ -168,6 +168,13 @@ class User(TableABC): game_idents_repo: UserGameIdentRepositoryABC = services.get_service(UserGameIdentRepositoryABC) return game_idents_repo.get_user_game_idents_by_user_id(self.id) + @property + @ServiceProviderABC.inject + def profile_picture_url(self, bot: DiscordBotServiceABC) -> str: + guild = bot.get_guild(self.server.discord_id) + user = guild.get_member(self._discord_id) + return None if user is None else user.avatar.url + @staticmethod def get_select_all_string() -> str: return str( diff --git a/bot/src/bot_graphql/graphql/user.gql b/bot/src/bot_graphql/graphql/user.gql index e4ed9ea1..029bd7ce 100644 --- a/bot/src/bot_graphql/graphql/user.gql +++ b/bot/src/bot_graphql/graphql/user.gql @@ -11,6 +11,8 @@ type User implements TableWithHistoryQuery { level: Level activityScore: Int + profilePictureURL: String + joinedServers(filter: UserJoinedServerFilter, page: Page, sort: Sort): [UserJoinedServer] joinedServerCount: Int diff --git a/bot/src/bot_graphql/queries/user_query.py b/bot/src/bot_graphql/queries/user_query.py index 1d31312f..6ea49d9a 100644 --- a/bot/src/bot_graphql/queries/user_query.py +++ b/bot/src/bot_graphql/queries/user_query.py @@ -88,3 +88,4 @@ class UserQuery(DataQueryWithHistoryABC): self.set_field("server", lambda user, *_: user.server) self.set_field("leftServer", lambda user, *_: user.left_server) + self.set_field("profilePictureURL", lambda user, *_: user.profile_picture_url) diff --git a/web/src/app/models/data/user.model.ts b/web/src/app/models/data/user.model.ts index f7ae3454..a21884bc 100644 --- a/web/src/app/models/data/user.model.ts +++ b/web/src/app/models/data/user.model.ts @@ -36,6 +36,8 @@ export interface User extends DataWithHistory { userWarningCount?: number; userWarnings?: UserWarning[]; + + profilePictureURL?: string; } export interface UserFilter { diff --git a/web/src/app/models/graphql/queries.model.ts b/web/src/app/models/graphql/queries.model.ts index 2db56afa..d5ceb096 100644 --- a/web/src/app/models/graphql/queries.model.ts +++ b/web/src/app/models/graphql/queries.model.ts @@ -406,6 +406,7 @@ export class Queries { joinedOn leavedOn } + profilePictureURL createdAt modifiedAt diff --git a/web/src/app/modules/shared/shared.module.ts b/web/src/app/modules/shared/shared.module.ts index af9e8ea8..55abd3ad 100644 --- a/web/src/app/modules/shared/shared.module.ts +++ b/web/src/app/modules/shared/shared.module.ts @@ -40,6 +40,7 @@ import { TabViewModule } from "primeng/tabview"; import { RadioButtonModule } from "primeng/radiobutton"; import { InputTextareaModule } from "primeng/inputtextarea"; import { InputMaskModule } from "primeng/inputmask"; +import { KnobModule } from "primeng/knob"; const PrimeNGModules = [ @@ -73,7 +74,8 @@ const PrimeNGModules = [ TabViewModule, RadioButtonModule, InputTextareaModule, - InputMaskModule + InputMaskModule, + KnobModule ]; @NgModule({ diff --git a/web/src/app/modules/view/server/profile/profile.component.html b/web/src/app/modules/view/server/profile/profile.component.html index ea14ad09..ba88ccfe 100644 --- a/web/src/app/modules/view/server/profile/profile.component.html +++ b/web/src/app/modules/view/server/profile/profile.component.html @@ -2,119 +2,94 @@ {{'view.server.profile.header' | translate}}
-
-

- {{user.name}} -

-
-
-
{{'common.id' | translate}}:
-
{{user.id}}
+
-
-
{{'common.discord_id' | translate}}:
-
{{user.discordId}}
+
+
+

{{user.name}}

+
+
+
{{'common.id' | translate}}:
+
{{user.id}}
+
+
+
{{'common.discord_id' | translate}}:
+
{{user.discordId}}
+
+
+
{{'view.server.profile.message_count' | translate}}:
+
{{user.messageCount}}
+
+
+
{{'view.server.profile.reaction_count' | translate}}:
+
{{user.reactionCount}}
+
+
+
{{'view.server.profile.birthday' | translate}}:
+
{{user.birthday}}
+
+ +
+
+
+
+
{{'view.server.profile.left_server' | translate}}:
+
{{user.leftServer | bool}}
+
+
+
{{'common.created_at' | translate}}:
+
{{user.createdAt | date:'dd.MM.yyyy HH:mm:ss'}}
+
+
+
{{'common.modified_at' | translate}}:
+
{{user.modifiedAt | date:'dd.MM.yyyy HH:mm:ss'}}
+
-
+
+
+
+ +
+
+ -
-
-
{{'view.server.profile.name' | translate}}:
-
{{user.name}}
-
-
- -
-
-
{{'view.server.profile.xp' | translate}}:
-
{{user.xp}}
-
-
-
- -
-
-
{{'view.server.profile.message_count' | translate}}:
-
{{user.messageCount}}
-
-
- -
-
-
{{'view.server.profile.reaction_count' | translate}}:
-
{{user.reactionCount}}
-
-
- -
-
-
{{'view.server.profile.birthday' | translate}}:
-
{{user.birthday}}
-
- +
+ {{user.level.name}} +
+
+
+
+
+
{{'common.ontime' | translate}}:
+
{{user.ontime}}
+
+
+
{{'common.game_ontime' | translate}}:
+
{{user.gameOntime}}
+
+
+
{{'common.activity' | translate}}:
+
{{user.activityScore}}
+
-
-
-
{{'common.ontime' | translate}}:
-
{{user.ontime}}
-
-
- -
-
-
{{'common.game_ontime' | translate}}:
-
{{user.gameOntime}}
-
-
- -
-
-
{{'common.activity' | translate}}:
-
{{user.activityScore}}
-
-
- -
-
-
{{'view.server.profile.level' | translate}}:
-
{{user.level?.name}}
-
- - -
-
-
- -
-
-
{{'view.server.profile.left_server' | translate}}:
-
{{user.leftServer | bool}}
-
-
- -
-
-
{{'common.created_at' | translate}}:
-
{{user.createdAt | date:'dd.MM.yyyy HH:mm:ss'}}
-
-
- -
-
-
{{'common.modified_at' | translate}}:
-
{{user.modifiedAt | date:'dd.MM.yyyy HH:mm:ss'}}
-
-
+
-
diff --git a/web/src/app/modules/view/server/profile/profile.component.ts b/web/src/app/modules/view/server/profile/profile.component.ts index c66a5393..9735c675 100644 --- a/web/src/app/modules/view/server/profile/profile.component.ts +++ b/web/src/app/modules/view/server/profile/profile.component.ts @@ -150,7 +150,7 @@ export class ProfileComponent implements OnInit, OnDestroy { this.data.mutation(Mutations.updateUser, { id: this.user.id, xp: this.user.xp, - birthday: moment(this.user.birthday).format("DD.MM.YYYY"), + birthday: moment(this.user.birthday, "DD.MM.YYYY").format("DD.MM.YYYY"), levelId: this.user.level?.id, userWarnings: this.user.userWarnings?.map(userWarning => { return { -- 2.45.2 From ba173a674316d7cb32cbc98d49b38aa1a6b810ce Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sun, 10 Dec 2023 19:50:44 +0100 Subject: [PATCH 22/30] Improved xp knob #409 --- .../app/modules/view/server/profile/profile.component.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/web/src/app/modules/view/server/profile/profile.component.ts b/web/src/app/modules/view/server/profile/profile.component.ts index 9735c675..a714e30f 100644 --- a/web/src/app/modules/view/server/profile/profile.component.ts +++ b/web/src/app/modules/view/server/profile/profile.component.ts @@ -89,10 +89,6 @@ export class ProfileComponent implements OnInit, OnDestroy { } ).subscribe(data => { this.levels = data.levels.map(level => { - if (level.minXp && level.minXp > this.maxXp) { - this.maxXp = level.minXp; - } - return { label: level.name ?? "", value: level }; }); }); @@ -119,8 +115,10 @@ export class ProfileComponent implements OnInit, OnDestroy { this.router.navigate([`/server/${server.id}`]); } this.user = users.users[0]; + const minXps = this.levels.reverse().map(x => x.value.minXp ?? 0); + this.maxXp = minXps.filter(x => this.user.xp && x > this.user.xp)[0] ?? this.user.xp; if (this.user.level) { - this.activeLevelIndex = this.levels.reverse().map(l => l.value.id).indexOf(this.user.level.id) + 1; + this.activeLevelIndex = this.levels.map(l => l.value.id).indexOf(this.user.level.id) + 1; } this.data.query(Queries.userProfileWarnings, { -- 2.45.2 From 4e80e3ccb7d44e2ffebde5fe88e410a9ddb31daa Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Mon, 11 Dec 2023 21:34:38 +0100 Subject: [PATCH 23/30] Added gmod support #277 --- .../user_joined_game_server_mutation.py | 7 ++- .../modules/base/command/register_group.py | 58 +++++++++++++++++-- 2 files changed, 57 insertions(+), 8 deletions(-) diff --git a/bot/src/bot_graphql/mutations/user_joined_game_server_mutation.py b/bot/src/bot_graphql/mutations/user_joined_game_server_mutation.py index c2a3a3ec..4c4987fc 100644 --- a/bot/src/bot_graphql/mutations/user_joined_game_server_mutation.py +++ b/bot/src/bot_graphql/mutations/user_joined_game_server_mutation.py @@ -11,6 +11,7 @@ from flask import request from bot_api.configuration.authentication_settings import AuthenticationSettings from bot_core.configuration.feature_flags_enum import FeatureFlagsEnum from bot_core.configuration.feature_flags_settings import FeatureFlagsSettings +from bot_core.service.permission_service import PermissionService from bot_data.abc.api_key_repository_abc import ApiKeyRepositoryABC from bot_data.abc.game_server_repository_abc import GameServerRepositoryABC from bot_data.abc.server_repository_abc import ServerRepositoryABC @@ -24,7 +25,6 @@ from bot_data.model.server_config import ServerConfig from bot_data.model.user_joined_game_server import UserJoinedGameServer from bot_data.model.user_role_enum import UserRoleEnum from bot_graphql.abc.query_abc import QueryABC -from bot_core.service.permission_service import PermissionService class UserJoinedGameServerMutation(QueryABC): @@ -79,7 +79,10 @@ class UserJoinedGameServerMutation(QueryABC): ) def resolve_user_joined(self, *_, input: dict): - game_ident = self._user_game_idents.get_user_game_ident_by_ident(input["ident"]) + game_ident = self._user_game_idents.find_user_game_ident_by_ident(input["ident"]) + if game_ident is None: + return + user = game_ident.user settings: ServerConfig = self._config.get_configuration(f"ServerConfig_{user.server.discord_id}") diff --git a/bot/src/modules/base/command/register_group.py b/bot/src/modules/base/command/register_group.py index a598b31e..dea76ea9 100644 --- a/bot/src/modules/base/command/register_group.py +++ b/bot/src/modules/base/command/register_group.py @@ -9,6 +9,7 @@ from cpl_translation import TranslatePipe from discord import app_commands from discord.ext import commands from discord.ext.commands import Context +from valve.steam.id import SteamID from bot_core.abc.client_utils_abc import ClientUtilsABC from bot_core.abc.message_service_abc import MessageServiceABC @@ -50,6 +51,17 @@ class RegisterGroup(DiscordCommandABC): self._logger.trace(__name__, f"Loaded command service: {type(self).__name__}") + async def _game_server_autocomplete( + self, interaction: discord.Interaction, current: str + ) -> TList[app_commands.Choice[str]]: + server = self._servers.get_server_by_discord_id(interaction.guild.id) + game_servers = self._game_server.get_game_servers_by_server_id(server.id) + + return [ + app_commands.Choice(name=gs.name, value=gs.id) + for gs in self._client_utils.get_auto_complete_list(game_servers, current, lambda x: x.name) + ] + @commands.hybrid_group() @commands.guild_only() async def register(self, ctx: Context): @@ -101,10 +113,44 @@ class RegisterGroup(DiscordCommandABC): async def game_server_autocomplete( self, interaction: discord.Interaction, current: str ) -> TList[app_commands.Choice[str]]: - server = self._servers.get_server_by_discord_id(interaction.guild.id) - game_servers = self._game_server.get_game_servers_by_server_id(server.id) + return await self._game_server_autocomplete(interaction, current) - return [ - app_commands.Choice(name=gs.name, value=gs.id) - for gs in self._client_utils.get_auto_complete_list(game_servers, current, lambda x: x.name) - ] + @register.command() + @commands.guild_only() + @CommandChecks.check_is_ready() + @CommandChecks.check_is_member_moderator() + async def gmod(self, ctx: Context, member: discord.Member, game_server: int, steam_url: str): + self._logger.debug(__name__, f"Received command register gmod {ctx}") + + steam_id = None + try: + self._logger.debug(__name__, f"Try to get steam id for {id}") + steam_id = SteamID.from_community_url(steam_url) + except Exception as e: + self._logger.error(__name__, f"Get steam id for {steam_id} failed", e) + await self._message_service.send_interaction_msg( + ctx.interaction, self._t.transform("modules.base.register.not_found") + ) + + if steam_id is None: + return + + server = self._servers.get_server_by_discord_id(ctx.guild.id) + user = self._users.get_user_by_discord_id_and_server_id(member.id, server.id) + gs = self._game_server.get_game_server_by_id(game_server) + + game_ident = UserGameIdent(user, gs, steam_id) + self._user_game_ident.add_user_game_ident(game_ident) + self._db.save_changes() + + await self._message_service.send_interaction_msg( + ctx.interaction, self._t.transform("modules.base.register.success") + ) + + self._logger.trace(__name__, f"Finished register gmod command") + + @gmod.autocomplete("game_server") + async def game_server_autocomplete( + self, interaction: discord.Interaction, current: str + ) -> TList[app_commands.Choice[str]]: + return await self._game_server_autocomplete(interaction, current) -- 2.45.2 From 36998470e820d59cda2a7155e04f37b360d70844 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Wed, 13 Dec 2023 11:25:51 +0100 Subject: [PATCH 24/30] Try filtering scheduled events --- bot/src/modules/base/service/event_service.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot/src/modules/base/service/event_service.py b/bot/src/modules/base/service/event_service.py index 51298b3c..106325c0 100644 --- a/bot/src/modules/base/service/event_service.py +++ b/bot/src/modules/base/service/event_service.py @@ -9,7 +9,7 @@ from cpl_core.database.context import DatabaseContextABC from cpl_core.logging import LoggerABC from cpl_discord.container import Guild from cpl_query.extension import List -from discord import PrivacyLevel +from discord import PrivacyLevel, EventStatus from discord.scheduled_event import ScheduledEvent as DiscordEvent from bot_data.abc.scheduled_event_repository_abc import ScheduledEventRepositoryABC @@ -106,6 +106,7 @@ class EventService: lambda x: x.name == scheduled_event.name and x.description == scheduled_event.description and x.entity_type == scheduled_event.entity_type + and x.status == EventStatus.scheduled ) if from_guild.count() != 0: self._logger.debug(__name__, f"Event {scheduled_event.name} already exists on discord server") -- 2.45.2 From 280cd9827da5cedc896f9cd790d22e1870752aa7 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Wed, 13 Dec 2023 11:59:21 +0100 Subject: [PATCH 25/30] shutdown correct stack --- .gitea/workflows/deploy_staging.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy_staging.yaml b/.gitea/workflows/deploy_staging.yaml index 530b181f..e2ed5a3a 100644 --- a/.gitea/workflows/deploy_staging.yaml +++ b/.gitea/workflows/deploy_staging.yaml @@ -11,7 +11,7 @@ jobs: container: git.sh-edraft.de/sh-edraft.de/act-runner:latest steps: - name: Shutdown stack - run: docker stack rm sdb_test + run: docker stack rm sdb_staging build-bot: needs: pre-build -- 2.45.2 From 266dacb301cb5bb11bed7f946ab433578a34ff62 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Wed, 13 Dec 2023 12:11:09 +0100 Subject: [PATCH 26/30] Fixed deps --- bot/src/bot/bot.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot/src/bot/bot.json b/bot/src/bot/bot.json index a4a93dda..7e04313a 100644 --- a/bot/src/bot/bot.json +++ b/bot/src/bot/bot.json @@ -33,7 +33,8 @@ "cryptography==41.0.4", "discord==2.3.2", "bs4==0.0.1", - "lxml==4.9.3" + "lxml==4.9.3", + "python-valve==0.2.1" ], "DevDependencies": [ "cpl-cli==2023.4.0.post3", -- 2.45.2 From f1f5954dfc868d74df6573a8240d8678cfb9b0b3 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Fri, 15 Dec 2023 13:42:49 +0100 Subject: [PATCH 27/30] Added reset member after rejoin setting to backend [untested] #460 --- bot/src/bot_data/model/server_config.py | 11 ++ bot/src/bot_data/model/user.py | 5 + .../1.2.4/1_ResetMemberAfterRejoin_down.sql | 7 ++ .../1.2.4/1_ResetMemberAfterRejoin_up.sql | 116 ++++++++++++++++++ .../base/events/base_on_member_join_event.py | 6 + 5 files changed, 145 insertions(+) create mode 100644 bot/src/bot_data/scripts/1.2.4/1_ResetMemberAfterRejoin_down.sql create mode 100644 bot/src/bot_data/scripts/1.2.4/1_ResetMemberAfterRejoin_up.sql diff --git a/bot/src/bot_data/model/server_config.py b/bot/src/bot_data/model/server_config.py index cf220355..d568f953 100644 --- a/bot/src/bot_data/model/server_config.py +++ b/bot/src/bot_data/model/server_config.py @@ -32,6 +32,7 @@ class ServerConfig(TableABC, ConfigurationModelABC): default_role_id: Optional[int], short_role_name_only_set_highest_role: bool, game_offer_notification_chat_id: int, + reset_member_after_rejoin: bool, feature_flags: dict[FeatureFlagsEnum], server: Server, afk_channel_ids: List[int], @@ -58,6 +59,7 @@ class ServerConfig(TableABC, ConfigurationModelABC): self._default_role_id = default_role_id self._short_role_name_only_set_highest_role = short_role_name_only_set_highest_role self._game_offer_notification_chat_id = game_offer_notification_chat_id + self._reset_member_after_rejoin = reset_member_after_rejoin self._feature_flags = feature_flags self._server = server @@ -88,6 +90,7 @@ class ServerConfig(TableABC, ConfigurationModelABC): None, False, guild.system_channel.id, + False, {}, server, List(int), @@ -234,6 +237,14 @@ class ServerConfig(TableABC, ConfigurationModelABC): def game_offer_notification_chat_id(self, value: int): self._game_offer_notification_chat_id = value + @property + def reset_member_after_rejoin(self) -> bool: + return self._reset_member_after_rejoin + + @reset_member_after_rejoin.setter + def reset_member_after_rejoin(self, value: bool): + self._reset_member_after_rejoin = value + @property def feature_flags(self) -> dict[FeatureFlagsEnum]: return self._feature_flags diff --git a/bot/src/bot_data/model/user.py b/bot/src/bot_data/model/user.py index bfc7be34..697511a2 100644 --- a/bot/src/bot_data/model/user.py +++ b/bot/src/bot_data/model/user.py @@ -38,6 +38,11 @@ class User(TableABC): self._created_at = created_at if created_at is not None else self._created_at self._modified_at = modified_at if modified_at is not None else self._modified_at + def reset(self): + self._xp = 0 + self._message_count = 0 + self._reaction_count = 0 + @property def id(self) -> int: return self._user_id diff --git a/bot/src/bot_data/scripts/1.2.4/1_ResetMemberAfterRejoin_down.sql b/bot/src/bot_data/scripts/1.2.4/1_ResetMemberAfterRejoin_down.sql new file mode 100644 index 00000000..5b584865 --- /dev/null +++ b/bot/src/bot_data/scripts/1.2.4/1_ResetMemberAfterRejoin_down.sql @@ -0,0 +1,7 @@ +ALTER TABLE CFG_Server + DROP COLUMN ResetMemberAfterRejoin; + +ALTER TABLE CFG_ServerHistory + DROP COLUMN ResetMemberAfterRejoin; + + diff --git a/bot/src/bot_data/scripts/1.2.4/1_ResetMemberAfterRejoin_up.sql b/bot/src/bot_data/scripts/1.2.4/1_ResetMemberAfterRejoin_up.sql new file mode 100644 index 00000000..4595e89f --- /dev/null +++ b/bot/src/bot_data/scripts/1.2.4/1_ResetMemberAfterRejoin_up.sql @@ -0,0 +1,116 @@ +ALTER TABLE CFG_Server + ADD ResetMemberAfterRejoin BOOLEAN NOT NULL DEFAULT FALSE AFTER GameOfferNotificationChatId; + + + +ALTER TABLE CFG_ServerHistory + ADD ResetMemberAfterRejoin BOOLEAN NOT NULL DEFAULT FALSE AFTER GameOfferNotificationChatId; + +DROP TRIGGER IF EXISTS `TR_CFG_ServerUpdate`;; + +CREATE TRIGGER `TR_CFG_ServerUpdate` + AFTER UPDATE + ON `CFG_Server` + FOR EACH ROW +BEGIN + INSERT INTO `CFG_ServerHistory` (`Id`, + `MessageDeleteTimer`, + `NotificationChatId`, + `MaxVoiceStateHours`, + `XpPerMessage`, + `XpPerReaction`, + `MaxMessageXpPerHour`, + `XpPerOntimeHour`, + `XpPerEventParticipation`, + `XpPerAchievement`, + `AFKCommandChannelId`, + `HelpVoiceChannelId`, + `TeamChannelId`, + `LoginMessageChannelId`, + `DefaultRoleId`, + `ShortRoleNameSetOnlyHighest`, + `GameOfferNotificationChatId`, + `ResetMemberAfterRejoin`, + `FeatureFlags`, + `ServerId`, + `DateFrom`, + `DateTo`) + VALUES (OLD.Id, + OLD.MessageDeleteTimer, + OLD.NotificationChatId, + OLD.MaxVoiceStateHours, + OLD.XpPerMessage, + OLD.XpPerReaction, + OLD.MaxMessageXpPerHour, + OLD.XpPerOntimeHour, + OLD.XpPerEventParticipation, + OLD.XpPerAchievement, + OLD.AFKCommandChannelId, + OLD.HelpVoiceChannelId, + OLD.TeamChannelId, + OLD.LoginMessageChannelId, + OLD.DefaultRoleId, + OLD.ShortRoleNameSetOnlyHighest, + OLD.GameOfferNotificationChatId, + OLD.ResetMemberAfterRejoin, + OLD.FeatureFlags, + OLD.ServerId, + OLD.LastModifiedAt, + CURRENT_TIMESTAMP(6)); +END;; + +DROP TRIGGER IF EXISTS `TR_CFG_ServerDelete`;; + +CREATE TRIGGER `TR_CFG_ServerDelete` + AFTER DELETE + ON `CFG_Server` + FOR EACH ROW +BEGIN + INSERT INTO `CFG_ServerHistory` (`Id`, + `MessageDeleteTimer`, + `NotificationChatId`, + `MaxVoiceStateHours`, + `XpPerMessage`, + `XpPerReaction`, + `MaxMessageXpPerHour`, + `XpPerOntimeHour`, + `XpPerEventParticipation`, + `XpPerAchievement`, + `AFKCommandChannelId`, + `HelpVoiceChannelId`, + `TeamChannelId`, + `LoginMessageChannelId`, + `DefaultRoleId`, + `ShortRoleNameSetOnlyHighest`, + `GameOfferNotificationChatId`, + `ResetMemberAfterRejoin`, + `ServerId`, + `FeatureFlags`, + `Deleted`, + `DateFrom`, + `DateTo`) + VALUES (OLD.Id, + OLD.MessageDeleteTimer, + OLD.NotificationChatId, + OLD.MaxVoiceStateHours, + OLD.XpPerMessage, + OLD.XpPerReaction, + OLD.MaxMessageXpPerHour, + OLD.XpPerOntimeHour, + OLD.XpPerEventParticipation, + OLD.XpPerAchievement, + OLD.AFKCommandChannelId, + OLD.HelpVoiceChannelId, + OLD.TeamChannelId, + OLD.LoginMessageChannelId, + OLD.DefaultRoleId, + OLD.ShortRoleNameSetOnlyHighest, + OLD.GameOfferNotificationChatId, + OLD.ResetMemberAfterRejoin, + OLD.FeatureFlags, + OLD.ServerId, + TRUE, + OLD.LastModifiedAt, + CURRENT_TIMESTAMP(6)); +END;; + diff --git a/bot/src/modules/base/events/base_on_member_join_event.py b/bot/src/modules/base/events/base_on_member_join_event.py index 4cd4f2e3..ef7da1a3 100644 --- a/bot/src/modules/base/events/base_on_member_join_event.py +++ b/bot/src/modules/base/events/base_on_member_join_event.py @@ -78,6 +78,12 @@ class BaseOnMemberJoinEvent(OnMemberJoinABC): user = self._users.find_user_by_discord_id_and_server_id(member.id, server.id) if user is not None: self._user_joins.add_user_joined_server(UserJoinedServer(user, datetime.now())) + + server_config: ServerConfig = self._config.get_configuration(f"ServerConfig_{member.guild.id}") + if server_config.reset_member_after_rejoin: + user.reset() + self._users.update_user(user) + self._db.save_changes() return -- 2.45.2 From e516def7ef4c19db4a68906f9d90237565da16dd Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Fri, 15 Dec 2023 15:20:39 +0100 Subject: [PATCH 28/30] Added reset member after rejoin setting to gql #460 --- bot/src/bot/__init__.py | 4 +- bot/src/bot/bot.json | 2 +- bot/src/bot/extension/__init__.py | 4 +- bot/src/bot_api/__init__.py | 4 +- bot/src/bot_api/abc/__init__.py | 4 +- bot/src/bot_api/bot-api.json | 2 +- bot/src/bot_api/configuration/__init__.py | 4 +- bot/src/bot_api/controller/__init__.py | 4 +- bot/src/bot_api/event/__init__.py | 4 +- bot/src/bot_api/exception/__init__.py | 4 +- bot/src/bot_api/filter/__init__.py | 4 +- bot/src/bot_api/filter/discord/__init__.py | 4 +- bot/src/bot_api/logging/__init__.py | 4 +- bot/src/bot_api/model/__init__.py | 4 +- bot/src/bot_api/model/discord/__init__.py | 4 +- bot/src/bot_api/route/__init__.py | 4 +- bot/src/bot_api/service/__init__.py | 4 +- bot/src/bot_api/transformer/__init__.py | 4 +- bot/src/bot_core/__init__.py | 4 +- bot/src/bot_core/abc/__init__.py | 4 +- bot/src/bot_core/bot-core.json | 2 +- bot/src/bot_core/configuration/__init__.py | 4 +- bot/src/bot_core/core_extension/__init__.py | 4 +- bot/src/bot_core/events/__init__.py | 4 +- bot/src/bot_core/exception/__init__.py | 4 +- bot/src/bot_core/helper/__init__.py | 4 +- bot/src/bot_core/logging/__init__.py | 4 +- bot/src/bot_core/pipes/__init__.py | 4 +- bot/src/bot_core/service/__init__.py | 4 +- bot/src/bot_data/__init__.py | 4 +- bot/src/bot_data/abc/__init__.py | 4 +- bot/src/bot_data/bot-data.json | 2 +- bot/src/bot_data/model/__init__.py | 4 +- bot/src/bot_data/service/__init__.py | 4 +- .../server_config_repository_service.py | 11 +- bot/src/bot_graphql/__init__.py | 4 +- bot/src/bot_graphql/abc/__init__.py | 4 +- bot/src/bot_graphql/bot-graphql.json | 2 +- bot/src/bot_graphql/filter/__init__.py | 4 +- bot/src/bot_graphql/graphql/serverConfig.gql | 1 + bot/src/bot_graphql/model/__init__.py | 4 +- bot/src/bot_graphql/mutations/__init__.py | 4 +- .../mutations/server_config_mutation.py | 5 + bot/src/bot_graphql/queries/__init__.py | 4 +- .../bot_graphql/queries/discord/__init__.py | 4 +- .../queries/server_config_query.py | 1 + bot/src/modules/achievements/__init__.py | 4 +- .../modules/achievements/achievements.json | 2 +- .../modules/achievements/commands/__init__.py | 4 +- .../modules/achievements/events/__init__.py | 4 +- .../modules/achievements/model/__init__.py | 4 +- bot/src/modules/auto_role/__init__.py | 4 +- bot/src/modules/auto_role/auto-role.json | 2 +- bot/src/modules/auto_role/command/__init__.py | 4 +- bot/src/modules/auto_role/events/__init__.py | 4 +- bot/src/modules/auto_role/helper/__init__.py | 4 +- bot/src/modules/base/__init__.py | 4 +- bot/src/modules/base/base.json | 2 +- bot/src/modules/base/command/__init__.py | 4 +- bot/src/modules/base/events/__init__.py | 4 +- bot/src/modules/base/forms/__init__.py | 4 +- bot/src/modules/base/helper/__init__.py | 4 +- bot/src/modules/base/model/__init__.py | 4 +- bot/src/modules/base/service/__init__.py | 4 +- bot/src/modules/base/tasks/__init__.py | 4 +- bot/src/modules/boot_log/__init__.py | 4 +- bot/src/modules/boot_log/boot-log.json | 2 +- bot/src/modules/config/__init__.py | 4 +- bot/src/modules/config/config.json | 2 +- bot/src/modules/config/events/__init__.py | 4 +- bot/src/modules/config/service/__init__.py | 4 +- bot/src/modules/database/__init__.py | 4 +- bot/src/modules/database/database.json | 2 +- bot/src/modules/level/__init__.py | 4 +- bot/src/modules/level/command/__init__.py | 4 +- .../modules/level/configuration/__init__.py | 4 +- bot/src/modules/level/events/__init__.py | 4 +- bot/src/modules/level/level.json | 2 +- bot/src/modules/level/service/__init__.py | 4 +- bot/src/modules/short_role_name/__init__.py | 4 +- .../short_role_name/events/__init__.py | 4 +- .../short_role_name/service/__init__.py | 4 +- .../short_role_name/short-role-name.json | 2 +- bot/src/modules/special_offers/__init__.py | 4 +- .../special_offers/special-offers.json | 2 +- bot/src/modules/technician/__init__.py | 4 +- .../modules/technician/command/__init__.py | 4 +- bot/src/modules/technician/technician.json | 2 +- bot/tools/checks/checks.json | 2 +- bot/tools/get_version/get-version.json | 2 +- .../migration_to_sql/migration-to-sql.json | 2 +- bot/tools/post_build/post-build.json | 2 +- bot/tools/set_version/set-version.json | 2 +- web/package.json | 110 +++++++++--------- web/src/assets/version.json | 12 +- 95 files changed, 232 insertions(+), 224 deletions(-) diff --git a/bot/src/bot/__init__.py b/bot/src/bot/__init__.py index ede30721..d0fc8939 100644 --- a/bot/src/bot/__init__.py +++ b/bot/src/bot/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot/bot.json b/bot/src/bot/bot.json index 7e04313a..ebd65618 100644 --- a/bot/src/bot/bot.json +++ b/bot/src/bot/bot.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "3" + "Micro": "4" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/bot/src/bot/extension/__init__.py b/bot/src/bot/extension/__init__.py index e2eb725e..d95a96d5 100644 --- a/bot/src/bot/extension/__init__.py +++ b/bot/src/bot/extension/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot.extension" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_api/__init__.py b/bot/src/bot_api/__init__.py index ad8a9c26..02804b0c 100644 --- a/bot/src/bot_api/__init__.py +++ b/bot/src/bot_api/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_api/abc/__init__.py b/bot/src/bot_api/abc/__init__.py index 8df940d6..6b25caed 100644 --- a/bot/src/bot_api/abc/__init__.py +++ b/bot/src/bot_api/abc/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.abc" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_api/bot-api.json b/bot/src/bot_api/bot-api.json index 2a3b6254..29d19d52 100644 --- a/bot/src/bot_api/bot-api.json +++ b/bot/src/bot_api/bot-api.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "3" + "Micro": "4" }, "Author": "", "AuthorEmail": "", diff --git a/bot/src/bot_api/configuration/__init__.py b/bot/src/bot_api/configuration/__init__.py index d6362551..e3a7ed64 100644 --- a/bot/src/bot_api/configuration/__init__.py +++ b/bot/src/bot_api/configuration/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.configuration" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_api/controller/__init__.py b/bot/src/bot_api/controller/__init__.py index ad8aff7d..4d77ff5c 100644 --- a/bot/src/bot_api/controller/__init__.py +++ b/bot/src/bot_api/controller/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.controller" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_api/event/__init__.py b/bot/src/bot_api/event/__init__.py index 933a8fac..4aafc6ce 100644 --- a/bot/src/bot_api/event/__init__.py +++ b/bot/src/bot_api/event/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.event" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_api/exception/__init__.py b/bot/src/bot_api/exception/__init__.py index 1607622c..e9a92395 100644 --- a/bot/src/bot_api/exception/__init__.py +++ b/bot/src/bot_api/exception/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.exception" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_api/filter/__init__.py b/bot/src/bot_api/filter/__init__.py index 5da317f5..6da7693c 100644 --- a/bot/src/bot_api/filter/__init__.py +++ b/bot/src/bot_api/filter/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.filter" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_api/filter/discord/__init__.py b/bot/src/bot_api/filter/discord/__init__.py index 17145205..ae5120b8 100644 --- a/bot/src/bot_api/filter/discord/__init__.py +++ b/bot/src/bot_api/filter/discord/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.filter.discord" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_api/logging/__init__.py b/bot/src/bot_api/logging/__init__.py index a044a459..63e95dab 100644 --- a/bot/src/bot_api/logging/__init__.py +++ b/bot/src/bot_api/logging/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.logging" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_api/model/__init__.py b/bot/src/bot_api/model/__init__.py index f811c99b..22127c54 100644 --- a/bot/src/bot_api/model/__init__.py +++ b/bot/src/bot_api/model/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.model" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_api/model/discord/__init__.py b/bot/src/bot_api/model/discord/__init__.py index 17902e62..4e6dbdbc 100644 --- a/bot/src/bot_api/model/discord/__init__.py +++ b/bot/src/bot_api/model/discord/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.model.discord" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_api/route/__init__.py b/bot/src/bot_api/route/__init__.py index 71418409..725ab582 100644 --- a/bot/src/bot_api/route/__init__.py +++ b/bot/src/bot_api/route/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.route" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_api/service/__init__.py b/bot/src/bot_api/service/__init__.py index e90a199d..74a40e7d 100644 --- a/bot/src/bot_api/service/__init__.py +++ b/bot/src/bot_api/service/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.service" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_api/transformer/__init__.py b/bot/src/bot_api/transformer/__init__.py index b3ab743f..ba67b878 100644 --- a/bot/src/bot_api/transformer/__init__.py +++ b/bot/src/bot_api/transformer/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_api.transformer" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_core/__init__.py b/bot/src/bot_core/__init__.py index e1220bf6..8faffc9b 100644 --- a/bot/src/bot_core/__init__.py +++ b/bot/src/bot_core/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_core/abc/__init__.py b/bot/src/bot_core/abc/__init__.py index 38117eb7..d30b45cb 100644 --- a/bot/src/bot_core/abc/__init__.py +++ b/bot/src/bot_core/abc/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core.abc" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_core/bot-core.json b/bot/src/bot_core/bot-core.json index b487a8c2..e211887f 100644 --- a/bot/src/bot_core/bot-core.json +++ b/bot/src/bot_core/bot-core.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "3" + "Micro": "4" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/bot/src/bot_core/configuration/__init__.py b/bot/src/bot_core/configuration/__init__.py index 6cecd704..7c70e26a 100644 --- a/bot/src/bot_core/configuration/__init__.py +++ b/bot/src/bot_core/configuration/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core.configuration" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_core/core_extension/__init__.py b/bot/src/bot_core/core_extension/__init__.py index f08f3680..bd378aa2 100644 --- a/bot/src/bot_core/core_extension/__init__.py +++ b/bot/src/bot_core/core_extension/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core.core_extension" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_core/events/__init__.py b/bot/src/bot_core/events/__init__.py index b06a8c59..260817b2 100644 --- a/bot/src/bot_core/events/__init__.py +++ b/bot/src/bot_core/events/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core.events" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_core/exception/__init__.py b/bot/src/bot_core/exception/__init__.py index ea4dc40e..e7f37a5f 100644 --- a/bot/src/bot_core/exception/__init__.py +++ b/bot/src/bot_core/exception/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core.exception" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_core/helper/__init__.py b/bot/src/bot_core/helper/__init__.py index 7a755460..26fdc3f6 100644 --- a/bot/src/bot_core/helper/__init__.py +++ b/bot/src/bot_core/helper/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core.helper" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_core/logging/__init__.py b/bot/src/bot_core/logging/__init__.py index 870f1127..e9875ade 100644 --- a/bot/src/bot_core/logging/__init__.py +++ b/bot/src/bot_core/logging/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core.logging" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_core/pipes/__init__.py b/bot/src/bot_core/pipes/__init__.py index ac3665d9..fab67a2f 100644 --- a/bot/src/bot_core/pipes/__init__.py +++ b/bot/src/bot_core/pipes/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core.pipes" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_core/service/__init__.py b/bot/src/bot_core/service/__init__.py index eb809109..e0a4d925 100644 --- a/bot/src/bot_core/service/__init__.py +++ b/bot/src/bot_core/service/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_core.service" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_data/__init__.py b/bot/src/bot_data/__init__.py index 2046b7b3..fb82fd53 100644 --- a/bot/src/bot_data/__init__.py +++ b/bot/src/bot_data/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_data" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_data/abc/__init__.py b/bot/src/bot_data/abc/__init__.py index 07f80535..75ec2b09 100644 --- a/bot/src/bot_data/abc/__init__.py +++ b/bot/src/bot_data/abc/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_data.abc" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_data/bot-data.json b/bot/src/bot_data/bot-data.json index 8b20043c..4a12a4f6 100644 --- a/bot/src/bot_data/bot-data.json +++ b/bot/src/bot_data/bot-data.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "3" + "Micro": "4" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/bot/src/bot_data/model/__init__.py b/bot/src/bot_data/model/__init__.py index deffc730..1e9a2550 100644 --- a/bot/src/bot_data/model/__init__.py +++ b/bot/src/bot_data/model/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_data.model" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_data/service/__init__.py b/bot/src/bot_data/service/__init__.py index 5ff7280a..50733298 100644 --- a/bot/src/bot_data/service/__init__.py +++ b/bot/src/bot_data/service/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_data.service" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_data/service/server_config_repository_service.py b/bot/src/bot_data/service/server_config_repository_service.py index 3ff90d50..f745dd1a 100644 --- a/bot/src/bot_data/service/server_config_repository_service.py +++ b/bot/src/bot_data/service/server_config_repository_service.py @@ -79,12 +79,13 @@ class ServerConfigRepositoryService(ServerConfigRepositoryABC): result[15], result[16], result[17], - json.loads(result[18]), - self._servers.get_server_by_id(result[19]), - self._get_afk_channel_ids(result[19]), - self._get_team_role_ids(result[19]), - result[20], + result[18], + json.loads(result[19]), + self._servers.get_server_by_id(result[20]), + self._get_afk_channel_ids(result[20]), + self._get_team_role_ids(result[20]), result[21], + result[22], id=result[0], ) diff --git a/bot/src/bot_graphql/__init__.py b/bot/src/bot_graphql/__init__.py index 0f5e9fb0..8edb1920 100644 --- a/bot/src/bot_graphql/__init__.py +++ b/bot/src/bot_graphql/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_graphql" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_graphql/abc/__init__.py b/bot/src/bot_graphql/abc/__init__.py index 3d11d11a..e250bcc9 100644 --- a/bot/src/bot_graphql/abc/__init__.py +++ b/bot/src/bot_graphql/abc/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_graphql.abc" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_graphql/bot-graphql.json b/bot/src/bot_graphql/bot-graphql.json index d18cad0b..d117b720 100644 --- a/bot/src/bot_graphql/bot-graphql.json +++ b/bot/src/bot_graphql/bot-graphql.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "3" + "Micro": "4" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/bot/src/bot_graphql/filter/__init__.py b/bot/src/bot_graphql/filter/__init__.py index a8e2ba20..6178b7fd 100644 --- a/bot/src/bot_graphql/filter/__init__.py +++ b/bot/src/bot_graphql/filter/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_graphql.filter" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_graphql/graphql/serverConfig.gql b/bot/src/bot_graphql/graphql/serverConfig.gql index bc2f1e24..ca6c17c7 100644 --- a/bot/src/bot_graphql/graphql/serverConfig.gql +++ b/bot/src/bot_graphql/graphql/serverConfig.gql @@ -17,6 +17,7 @@ type ServerConfig implements TableWithHistoryQuery { defaultRoleId: String shortRoleNameOnlySetHighestRole: Boolean gameOfferNotificationChatId: String + resetMemberAfterRejoin: Boolean featureFlagCount: Int featureFlags: [FeatureFlag] diff --git a/bot/src/bot_graphql/model/__init__.py b/bot/src/bot_graphql/model/__init__.py index ba50ca77..030b7ea5 100644 --- a/bot/src/bot_graphql/model/__init__.py +++ b/bot/src/bot_graphql/model/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_graphql.model" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_graphql/mutations/__init__.py b/bot/src/bot_graphql/mutations/__init__.py index 0510b006..bb2ca92e 100644 --- a/bot/src/bot_graphql/mutations/__init__.py +++ b/bot/src/bot_graphql/mutations/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_graphql.mutations" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_graphql/mutations/server_config_mutation.py b/bot/src/bot_graphql/mutations/server_config_mutation.py index 88669d83..b3434ee0 100644 --- a/bot/src/bot_graphql/mutations/server_config_mutation.py +++ b/bot/src/bot_graphql/mutations/server_config_mutation.py @@ -105,6 +105,11 @@ class ServerConfigMutation(QueryABC): if "gameOfferNotificationChatId" in input else server_config.game_offer_notification_chat_id ) + server_config.reset_member_after_rejoin = ( + input["resetMemberAfterRejoin"] + if "resetMemberAfterRejoin" in input + else server_config.reset_member_after_rejoin + ) server_config.feature_flags = ( dict( zip( diff --git a/bot/src/bot_graphql/queries/__init__.py b/bot/src/bot_graphql/queries/__init__.py index 81fafcdc..8a86555b 100644 --- a/bot/src/bot_graphql/queries/__init__.py +++ b/bot/src/bot_graphql/queries/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_graphql.queries" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_graphql/queries/discord/__init__.py b/bot/src/bot_graphql/queries/discord/__init__.py index ae6338a4..7826593c 100644 --- a/bot/src/bot_graphql/queries/discord/__init__.py +++ b/bot/src/bot_graphql/queries/discord/__init__.py @@ -15,7 +15,7 @@ __title__ = "bot_graphql.queries.discord" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/bot_graphql/queries/server_config_query.py b/bot/src/bot_graphql/queries/server_config_query.py index 3f45fdbf..28915665 100644 --- a/bot/src/bot_graphql/queries/server_config_query.py +++ b/bot/src/bot_graphql/queries/server_config_query.py @@ -37,6 +37,7 @@ class ServerConfigQuery(DataQueryWithHistoryABC): "gameOfferNotificationChatId", lambda config, *_: config.game_offer_notification_chat_id, ) + self.set_field("resetMemberAfterRejoin", lambda config, *_: config.reset_member_after_rejoin) self.add_collection( "featureFlag", lambda config, *_: List( diff --git a/bot/src/modules/achievements/__init__.py b/bot/src/modules/achievements/__init__.py index 5a515655..6cff828b 100644 --- a/bot/src/modules/achievements/__init__.py +++ b/bot/src/modules/achievements/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.achievements" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/achievements/achievements.json b/bot/src/modules/achievements/achievements.json index a7d12f1c..a66f0238 100644 --- a/bot/src/modules/achievements/achievements.json +++ b/bot/src/modules/achievements/achievements.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "3" + "Micro": "4" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/bot/src/modules/achievements/commands/__init__.py b/bot/src/modules/achievements/commands/__init__.py index 795adef3..598f3459 100644 --- a/bot/src/modules/achievements/commands/__init__.py +++ b/bot/src/modules/achievements/commands/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.achievements.commands" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/achievements/events/__init__.py b/bot/src/modules/achievements/events/__init__.py index 6ea099e1..f608ddf0 100644 --- a/bot/src/modules/achievements/events/__init__.py +++ b/bot/src/modules/achievements/events/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.achievements.events" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/achievements/model/__init__.py b/bot/src/modules/achievements/model/__init__.py index d2df4eff..f9fe1976 100644 --- a/bot/src/modules/achievements/model/__init__.py +++ b/bot/src/modules/achievements/model/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.achievements.model" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/auto_role/__init__.py b/bot/src/modules/auto_role/__init__.py index ca2e19ee..ffa186ac 100644 --- a/bot/src/modules/auto_role/__init__.py +++ b/bot/src/modules/auto_role/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.auto_role" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/auto_role/auto-role.json b/bot/src/modules/auto_role/auto-role.json index 4850d169..5fce685b 100644 --- a/bot/src/modules/auto_role/auto-role.json +++ b/bot/src/modules/auto_role/auto-role.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "3" + "Micro": "4" }, "Author": "", "AuthorEmail": "", diff --git a/bot/src/modules/auto_role/command/__init__.py b/bot/src/modules/auto_role/command/__init__.py index af18fdfa..9a2e8ac5 100644 --- a/bot/src/modules/auto_role/command/__init__.py +++ b/bot/src/modules/auto_role/command/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.auto_role.command" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/auto_role/events/__init__.py b/bot/src/modules/auto_role/events/__init__.py index 20df0dce..d8934766 100644 --- a/bot/src/modules/auto_role/events/__init__.py +++ b/bot/src/modules/auto_role/events/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.auto_role.events" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/auto_role/helper/__init__.py b/bot/src/modules/auto_role/helper/__init__.py index f922ea6b..58ac7080 100644 --- a/bot/src/modules/auto_role/helper/__init__.py +++ b/bot/src/modules/auto_role/helper/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.auto_role.helper" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/base/__init__.py b/bot/src/modules/base/__init__.py index 9a3b8f37..64ae66af 100644 --- a/bot/src/modules/base/__init__.py +++ b/bot/src/modules/base/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.base" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/base/base.json b/bot/src/modules/base/base.json index 4f7f0d66..cbb5cc35 100644 --- a/bot/src/modules/base/base.json +++ b/bot/src/modules/base/base.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "3" + "Micro": "4" }, "Author": "", "AuthorEmail": "", diff --git a/bot/src/modules/base/command/__init__.py b/bot/src/modules/base/command/__init__.py index 95188d93..9cf192ea 100644 --- a/bot/src/modules/base/command/__init__.py +++ b/bot/src/modules/base/command/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.base.command" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/base/events/__init__.py b/bot/src/modules/base/events/__init__.py index e36fb3b7..60423fe9 100644 --- a/bot/src/modules/base/events/__init__.py +++ b/bot/src/modules/base/events/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.base.events" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/base/forms/__init__.py b/bot/src/modules/base/forms/__init__.py index 4c32358c..3bdd3e26 100644 --- a/bot/src/modules/base/forms/__init__.py +++ b/bot/src/modules/base/forms/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.base.forms" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/base/helper/__init__.py b/bot/src/modules/base/helper/__init__.py index df7174fe..9bac9e70 100644 --- a/bot/src/modules/base/helper/__init__.py +++ b/bot/src/modules/base/helper/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.base.helper" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/base/model/__init__.py b/bot/src/modules/base/model/__init__.py index 751bd5cb..3eee60e7 100644 --- a/bot/src/modules/base/model/__init__.py +++ b/bot/src/modules/base/model/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.base.model" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/base/service/__init__.py b/bot/src/modules/base/service/__init__.py index 65c151ec..e1814108 100644 --- a/bot/src/modules/base/service/__init__.py +++ b/bot/src/modules/base/service/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.base.service" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/base/tasks/__init__.py b/bot/src/modules/base/tasks/__init__.py index 5a6527b3..5c79bf83 100644 --- a/bot/src/modules/base/tasks/__init__.py +++ b/bot/src/modules/base/tasks/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.base.tasks" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/boot_log/__init__.py b/bot/src/modules/boot_log/__init__.py index f44630ce..4e8183f2 100644 --- a/bot/src/modules/boot_log/__init__.py +++ b/bot/src/modules/boot_log/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.boot_log" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/boot_log/boot-log.json b/bot/src/modules/boot_log/boot-log.json index 36c149cd..5685d1d4 100644 --- a/bot/src/modules/boot_log/boot-log.json +++ b/bot/src/modules/boot_log/boot-log.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "3" + "Micro": "4" }, "Author": "", "AuthorEmail": "", diff --git a/bot/src/modules/config/__init__.py b/bot/src/modules/config/__init__.py index e98a633a..3186f542 100644 --- a/bot/src/modules/config/__init__.py +++ b/bot/src/modules/config/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.config" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/config/config.json b/bot/src/modules/config/config.json index 511f21f9..c8382b2a 100644 --- a/bot/src/modules/config/config.json +++ b/bot/src/modules/config/config.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "3" + "Micro": "4" }, "Author": "", "AuthorEmail": "", diff --git a/bot/src/modules/config/events/__init__.py b/bot/src/modules/config/events/__init__.py index ee18320d..4201867f 100644 --- a/bot/src/modules/config/events/__init__.py +++ b/bot/src/modules/config/events/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.config.events" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/config/service/__init__.py b/bot/src/modules/config/service/__init__.py index 57eace87..5c334d5a 100644 --- a/bot/src/modules/config/service/__init__.py +++ b/bot/src/modules/config/service/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.config.service" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/database/__init__.py b/bot/src/modules/database/__init__.py index 4c869766..fa9ed204 100644 --- a/bot/src/modules/database/__init__.py +++ b/bot/src/modules/database/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.database" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/database/database.json b/bot/src/modules/database/database.json index 79ef8549..9b8a10a8 100644 --- a/bot/src/modules/database/database.json +++ b/bot/src/modules/database/database.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "3" + "Micro": "4" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/bot/src/modules/level/__init__.py b/bot/src/modules/level/__init__.py index 6c40cc3b..ef4860f4 100644 --- a/bot/src/modules/level/__init__.py +++ b/bot/src/modules/level/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.level" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/level/command/__init__.py b/bot/src/modules/level/command/__init__.py index 4dae1895..1eb0f2aa 100644 --- a/bot/src/modules/level/command/__init__.py +++ b/bot/src/modules/level/command/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.level.command" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/level/configuration/__init__.py b/bot/src/modules/level/configuration/__init__.py index 62d131d9..a13c1f6e 100644 --- a/bot/src/modules/level/configuration/__init__.py +++ b/bot/src/modules/level/configuration/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.level.configuration" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/level/events/__init__.py b/bot/src/modules/level/events/__init__.py index 494be94c..32ae313b 100644 --- a/bot/src/modules/level/events/__init__.py +++ b/bot/src/modules/level/events/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.level.events" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/level/level.json b/bot/src/modules/level/level.json index 83abafe7..8d1642f1 100644 --- a/bot/src/modules/level/level.json +++ b/bot/src/modules/level/level.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "3" + "Micro": "4" }, "Author": "", "AuthorEmail": "", diff --git a/bot/src/modules/level/service/__init__.py b/bot/src/modules/level/service/__init__.py index 02f8210b..3c2528f1 100644 --- a/bot/src/modules/level/service/__init__.py +++ b/bot/src/modules/level/service/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.level.service" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/short_role_name/__init__.py b/bot/src/modules/short_role_name/__init__.py index 9d1ad394..3b7ef9d3 100644 --- a/bot/src/modules/short_role_name/__init__.py +++ b/bot/src/modules/short_role_name/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.short_role_name" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/short_role_name/events/__init__.py b/bot/src/modules/short_role_name/events/__init__.py index e767db05..676a1949 100644 --- a/bot/src/modules/short_role_name/events/__init__.py +++ b/bot/src/modules/short_role_name/events/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.short_role_name.events" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/short_role_name/service/__init__.py b/bot/src/modules/short_role_name/service/__init__.py index 10277e21..d9ad0b4e 100644 --- a/bot/src/modules/short_role_name/service/__init__.py +++ b/bot/src/modules/short_role_name/service/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.short_role_name.service" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/short_role_name/short-role-name.json b/bot/src/modules/short_role_name/short-role-name.json index 42ffeb41..46db7689 100644 --- a/bot/src/modules/short_role_name/short-role-name.json +++ b/bot/src/modules/short_role_name/short-role-name.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "3" + "Micro": "4" }, "Author": "", "AuthorEmail": "", diff --git a/bot/src/modules/special_offers/__init__.py b/bot/src/modules/special_offers/__init__.py index c4bb30aa..ac19f459 100644 --- a/bot/src/modules/special_offers/__init__.py +++ b/bot/src/modules/special_offers/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.special_offers" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/special_offers/special-offers.json b/bot/src/modules/special_offers/special-offers.json index ec7d544d..c9aa970d 100644 --- a/bot/src/modules/special_offers/special-offers.json +++ b/bot/src/modules/special_offers/special-offers.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "3" + "Micro": "4" }, "Author": "", "AuthorEmail": "", diff --git a/bot/src/modules/technician/__init__.py b/bot/src/modules/technician/__init__.py index af28e6c4..0dd6b9ee 100644 --- a/bot/src/modules/technician/__init__.py +++ b/bot/src/modules/technician/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.technician" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/technician/command/__init__.py b/bot/src/modules/technician/command/__init__.py index b66a249c..77aa36c4 100644 --- a/bot/src/modules/technician/command/__init__.py +++ b/bot/src/modules/technician/command/__init__.py @@ -15,7 +15,7 @@ __title__ = "modules.technician.command" __author__ = "Sven Heidemann" __license__ = "MIT" __copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de" -__version__ = "1.2.3" +__version__ = "1.2.4" from collections import namedtuple @@ -23,4 +23,4 @@ from collections import namedtuple # imports: VersionInfo = namedtuple("VersionInfo", "major minor micro") -version_info = VersionInfo(major="1", minor="2", micro="3") +version_info = VersionInfo(major="1", minor="2", micro="4") diff --git a/bot/src/modules/technician/technician.json b/bot/src/modules/technician/technician.json index dfdf7f18..239a899c 100644 --- a/bot/src/modules/technician/technician.json +++ b/bot/src/modules/technician/technician.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "3" + "Micro": "4" }, "Author": "", "AuthorEmail": "", diff --git a/bot/tools/checks/checks.json b/bot/tools/checks/checks.json index 50d69325..9a7e6251 100644 --- a/bot/tools/checks/checks.json +++ b/bot/tools/checks/checks.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "3" + "Micro": "4" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/bot/tools/get_version/get-version.json b/bot/tools/get_version/get-version.json index 538a045e..4c6c1417 100644 --- a/bot/tools/get_version/get-version.json +++ b/bot/tools/get_version/get-version.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "3" + "Micro": "4" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/bot/tools/migration_to_sql/migration-to-sql.json b/bot/tools/migration_to_sql/migration-to-sql.json index b3de0fc5..397dd0e0 100644 --- a/bot/tools/migration_to_sql/migration-to-sql.json +++ b/bot/tools/migration_to_sql/migration-to-sql.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "3" + "Micro": "4" }, "Author": "", "AuthorEmail": "", diff --git a/bot/tools/post_build/post-build.json b/bot/tools/post_build/post-build.json index 0c5e5cf4..81a3ab75 100644 --- a/bot/tools/post_build/post-build.json +++ b/bot/tools/post_build/post-build.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "3" + "Micro": "4" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/bot/tools/set_version/set-version.json b/bot/tools/set_version/set-version.json index 9f196731..706199ab 100644 --- a/bot/tools/set_version/set-version.json +++ b/bot/tools/set_version/set-version.json @@ -4,7 +4,7 @@ "Version": { "Major": "1", "Minor": "2", - "Micro": "3" + "Micro": "4" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/web/package.json b/web/package.json index 0b1829b7..f303b339 100644 --- a/web/package.json +++ b/web/package.json @@ -1,56 +1,56 @@ { - "name": "web", - "version": "1.2.3", - "scripts": { - "ng": "ng", - "update-version": "ts-node update-version.ts", - "prestart": "npm run update-version", - "start": "ng serve", - "prebuild": "npm run update-version", - "build": "ng build", - "watch": "ng build --watch --configuration development", - "test": "ng test", - "gv": "echo $npm_package_version", - "predocker-build": "npm run update-version", - "docker-build": "export VERSION=$npm_package_version; ng build; docker build -t sh-edraft.de/sdb-web:$VERSION .", - "docker-build-dev": "export VERSION=$npm_package_version; ng build --configuration development; docker build -t sh-edraft.de/sdb-web:$VERSION .", - "docker-build-stage": "export VERSION=$npm_package_version; ng build --configuration staging; docker build -t sh-edraft.de/sdb-web:$VERSION ." - }, - "private": true, - "dependencies": { - "@angular/animations": "^15.1.4", - "@angular/common": "^15.1.4", - "@angular/compiler": "^15.1.4", - "@angular/core": "^15.1.4", - "@angular/forms": "^15.1.4", - "@angular/platform-browser": "^15.1.4", - "@angular/platform-browser-dynamic": "^15.1.4", - "@angular/router": "^15.1.4", - "@auth0/angular-jwt": "^5.1.0", - "@microsoft/signalr": "^6.0.9", - "@ngx-translate/core": "^14.0.0", - "@ngx-translate/http-loader": "^7.0.0", - "@types/socket.io-client": "^3.0.0", - "moment": "^2.29.4", - "primeicons": "^6.0.1", - "primeng": "^15.2.0", - "rxjs": "~7.5.0", - "socket.io-client": "^4.5.3", - "zone.js": "~0.11.4" - }, - "devDependencies": { - "@angular-devkit/build-angular": "^15.1.5", - "@angular/cli": "~15.1.5", - "@angular/compiler-cli": "^15.1.4", - "@types/jasmine": "~4.0.0", - "@types/node": "^18.11.9", - "jasmine-core": "~4.1.0", - "karma": "~6.3.0", - "karma-chrome-launcher": "~3.1.0", - "karma-coverage": "~2.2.0", - "karma-jasmine": "~5.0.0", - "karma-jasmine-html-reporter": "~1.7.0", - "tslib": "^2.4.1", - "typescript": "~4.9.5" - } -} + "name": "web", + "version": "1.2.dev460", + "scripts": { + "ng": "ng", + "update-version": "ts-node update-version.ts", + "prestart": "npm run update-version", + "start": "ng serve", + "prebuild": "npm run update-version", + "build": "ng build", + "watch": "ng build --watch --configuration development", + "test": "ng test", + "gv": "echo $npm_package_version", + "predocker-build": "npm run update-version", + "docker-build": "export VERSION=$npm_package_version; ng build; docker build -t sh-edraft.de/sdb-web:$VERSION .", + "docker-build-dev": "export VERSION=$npm_package_version; ng build --configuration development; docker build -t sh-edraft.de/sdb-web:$VERSION .", + "docker-build-stage": "export VERSION=$npm_package_version; ng build --configuration staging; docker build -t sh-edraft.de/sdb-web:$VERSION ." + }, + "private": true, + "dependencies": { + "@angular/animations": "^15.1.4", + "@angular/common": "^15.1.4", + "@angular/compiler": "^15.1.4", + "@angular/core": "^15.1.4", + "@angular/forms": "^15.1.4", + "@angular/platform-browser": "^15.1.4", + "@angular/platform-browser-dynamic": "^15.1.4", + "@angular/router": "^15.1.4", + "@auth0/angular-jwt": "^5.1.0", + "@microsoft/signalr": "^6.0.9", + "@ngx-translate/core": "^14.0.0", + "@ngx-translate/http-loader": "^7.0.0", + "@types/socket.io-client": "^3.0.0", + "moment": "^2.29.4", + "primeicons": "^6.0.1", + "primeng": "^15.2.0", + "rxjs": "~7.5.0", + "socket.io-client": "^4.5.3", + "zone.js": "~0.11.4" + }, + "devDependencies": { + "@angular-devkit/build-angular": "^15.1.5", + "@angular/cli": "~15.1.5", + "@angular/compiler-cli": "^15.1.4", + "@types/jasmine": "~4.0.0", + "@types/node": "^18.11.9", + "jasmine-core": "~4.1.0", + "karma": "~6.3.0", + "karma-chrome-launcher": "~3.1.0", + "karma-coverage": "~2.2.0", + "karma-jasmine": "~5.0.0", + "karma-jasmine-html-reporter": "~1.7.0", + "tslib": "^2.4.1", + "typescript": "~4.9.5" + } +} \ No newline at end of file diff --git a/web/src/assets/version.json b/web/src/assets/version.json index 5ff7884e..d19ce170 100644 --- a/web/src/assets/version.json +++ b/web/src/assets/version.json @@ -1,7 +1,7 @@ { - "WebVersion": { - "Major": "1", - "Minor": "2", - "Micro": "3" - } -} + "WebVersion": { + "Major": "1", + "Minor": "2", + "Micro": "dev460" + } +} \ No newline at end of file -- 2.45.2 From 72715aac628b07990ba009616c83b830c9de8064 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Fri, 15 Dec 2023 15:38:38 +0100 Subject: [PATCH 29/30] Added frontend implementation #460 --- bot/src/bot_data/model/server_config.py | 3 + bot/src/bot_graphql/graphql/serverConfig.gql | 3 +- .../app/models/config/server-config.model.ts | 1 + web/src/app/models/graphql/mutations.model.ts | 3 + web/src/app/models/graphql/queries.model.ts | 1 + .../components/config/config.component.html | 73 +++++++++++++------ .../components/config/config.component.ts | 1 + web/src/assets/i18n/de.json | 1 + web/src/assets/i18n/en.json | 1 + 9 files changed, 65 insertions(+), 22 deletions(-) diff --git a/bot/src/bot_data/model/server_config.py b/bot/src/bot_data/model/server_config.py index d568f953..271329b0 100644 --- a/bot/src/bot_data/model/server_config.py +++ b/bot/src/bot_data/model/server_config.py @@ -321,6 +321,7 @@ class ServerConfig(TableABC, ConfigurationModelABC): `DefaultRoleId`, `ShortRoleNameSetOnlyHighest`, `GameOfferNotificationChatId`, + `ResetMemberAfterRejoin`, `FeatureFlags`, `ServerId` ) VALUES ( @@ -341,6 +342,7 @@ class ServerConfig(TableABC, ConfigurationModelABC): {"NULL" if self._default_role_id is None else self._default_role_id}, {self._short_role_name_only_set_highest_role}, {self._game_offer_notification_chat_id}, + {self._reset_member_after_rejoin}, '{json.dumps(self._feature_flags)}', {self._server.id} ); @@ -369,6 +371,7 @@ class ServerConfig(TableABC, ConfigurationModelABC): `DefaultRoleId` = {"NULL" if self._default_role_id is None else self._default_role_id}, `ShortRoleNameSetOnlyHighest` = {self._short_role_name_only_set_highest_role}, `GameOfferNotificationChatId` = {self._game_offer_notification_chat_id}, + `ResetMemberAfterRejoin` = {self._reset_member_after_rejoin}, `FeatureFlags` = '{json.dumps(self._feature_flags)}', `ServerId` = {self._server.id} WHERE `Id` = {self._id}; diff --git a/bot/src/bot_graphql/graphql/serverConfig.gql b/bot/src/bot_graphql/graphql/serverConfig.gql index ca6c17c7..a35b5a18 100644 --- a/bot/src/bot_graphql/graphql/serverConfig.gql +++ b/bot/src/bot_graphql/graphql/serverConfig.gql @@ -51,7 +51,7 @@ type ServerConfigHistory implements HistoryTableQuery { loginMessageChannelId: String defaultRoleId: String shortRoleNameOnlySetHighestRole: Boolean - gameOfferNotificationChatId: String + resetMemberAfterRejoin: Boolean featureFlagCount: Int featureFlags: [FeatureFlag] @@ -104,6 +104,7 @@ input ServerConfigInput { defaultRoleId: String shortRoleNameOnlySetHighestRole: Boolean gameOfferNotificationChatId: String + resetMemberAfterRejoin: Boolean featureFlags: [FeatureFlagInput] afkChannelIds: [String] diff --git a/web/src/app/models/config/server-config.model.ts b/web/src/app/models/config/server-config.model.ts index 616dbecc..bf31a525 100644 --- a/web/src/app/models/config/server-config.model.ts +++ b/web/src/app/models/config/server-config.model.ts @@ -20,6 +20,7 @@ export interface ServerConfig extends DataWithHistory { defaultRoleId?: string; shortRoleNameOnlySetHighestRole?: boolean; gameOfferNotificationChatId?: string; + resetMemberAfterRejoin?: boolean; featureFlags: FeatureFlag[]; afkChannelIds: string[]; moderatorRoleIds: string[]; diff --git a/web/src/app/models/graphql/mutations.model.ts b/web/src/app/models/graphql/mutations.model.ts index bdac7b0c..586f3928 100644 --- a/web/src/app/models/graphql/mutations.model.ts +++ b/web/src/app/models/graphql/mutations.model.ts @@ -340,6 +340,7 @@ export class Mutations { $defaultRoleId: String, $shortRoleNameOnlySetHighestRole: Boolean, $gameOfferNotificationChatId: String, + $resetMemberAfterRejoin: Boolean, $featureFlags: [FeatureFlagInput], $afkChannelIds: [String], $moderatorRoleIds: [String], @@ -365,6 +366,7 @@ export class Mutations { defaultRoleId: $defaultRoleId, shortRoleNameOnlySetHighestRole: $shortRoleNameOnlySetHighestRole, gameOfferNotificationChatId: $gameOfferNotificationChatId, + resetMemberAfterRejoin: $resetMemberAfterRejoin, featureFlags: $featureFlags, afkChannelIds: $afkChannelIds, moderatorRoleIds: $moderatorRoleIds, @@ -388,6 +390,7 @@ export class Mutations { defaultRoleId shortRoleNameOnlySetHighestRole gameOfferNotificationChatId + resetMemberAfterRejoin featureFlags { key value diff --git a/web/src/app/models/graphql/queries.model.ts b/web/src/app/models/graphql/queries.model.ts index d5ceb096..a387b22e 100644 --- a/web/src/app/models/graphql/queries.model.ts +++ b/web/src/app/models/graphql/queries.model.ts @@ -637,6 +637,7 @@ export class Queries { defaultRoleId shortRoleNameOnlySetHighestRole gameOfferNotificationChatId + resetMemberAfterRejoin featureFlags { key value diff --git a/web/src/app/modules/view/server/config/components/config/config.component.html b/web/src/app/modules/view/server/config/components/config/config.component.html index 8bc387f3..1a5fd307 100644 --- a/web/src/app/modules/view/server/config/components/config/config.component.html +++ b/web/src/app/modules/view/server/config/components/config/config.component.html @@ -14,14 +14,16 @@
{{'view.server.config.bot.message_delete_timer' | translate}}:
+ placeholder="{{'view.server.config.bot.message_delete_timer' | translate}}"> +
{{'view.server.config.bot.notification_chat_id' | translate}}:
-
@@ -30,14 +32,16 @@
{{'view.server.config.bot.max_voice_state_hours' | translate}}:
+ placeholder="{{'view.server.config.bot.max_voice_state_hours' | translate}}"> +
{{'view.server.config.bot.xp_per_message' | translate}}:
-
+
@@ -45,7 +49,8 @@
{{'view.server.config.bot.xp_per_reaction' | translate}}:
-
+
@@ -54,7 +59,8 @@
{{'view.server.config.bot.max_message_xp_per_hour' | translate}}:
+ placeholder="{{'view.server.config.bot.max_message_xp_per_hour' | translate}}"> +
@@ -62,7 +68,8 @@
{{'view.server.config.bot.xp_per_ontime_hour' | translate}}:
+ placeholder="{{'view.server.config.bot.xp_per_ontime_hour' | translate}}"> +
@@ -70,7 +77,8 @@
{{'view.server.config.bot.xp_per_event_participation' | translate}}:
+ placeholder="{{'view.server.config.bot.xp_per_event_participation' | translate}}"> +
@@ -78,7 +86,8 @@
{{'view.server.config.bot.xp_per_achievement' | translate}}:
+ placeholder="{{'view.server.config.bot.xp_per_achievement' | translate}}"> +
@@ -86,14 +95,16 @@
{{'view.server.config.bot.xp_for_birthday' | translate}}:
+ placeholder="{{'view.server.config.bot.xp_for_birthday' | translate}}"> +
{{'view.server.config.bot.afk_command_channel_id' | translate}}:
-
@@ -101,7 +112,8 @@
{{'view.server.config.bot.help_voice_channel_id' | translate}}:
-
@@ -109,7 +121,8 @@
{{'view.server.config.bot.team_channel_id' | translate}}:
-
@@ -117,7 +130,8 @@
{{'view.server.config.bot.login_message_channel_id' | translate}}:
-
@@ -125,15 +139,18 @@
{{'view.server.config.bot.default_role_id' | translate}}:
-
-
{{'view.server.config.bot.short_role_name_only_set_highest_role' | translate}}:
- {{'view.server.config.bot.short_role_name_only_set_highest_role' | translate}}: +
+
@@ -141,17 +158,31 @@
{{'view.server.config.bot.game_offer_notification_chat_id' | translate}}:
-
+
+
+
{{'view.server.config.bot.reset_member_after_rejoin' | translate}}:
+ +
+
+
- - - +
diff --git a/web/src/app/modules/view/server/config/components/config/config.component.ts b/web/src/app/modules/view/server/config/components/config/config.component.ts index 0c39cd02..80356584 100644 --- a/web/src/app/modules/view/server/config/components/config/config.component.ts +++ b/web/src/app/modules/view/server/config/components/config/config.component.ts @@ -126,6 +126,7 @@ export class ConfigComponent implements OnInit { defaultRoleId: this.config.defaultRoleId, shortRoleNameOnlySetHighestRole: this.config.shortRoleNameOnlySetHighestRole, gameOfferNotificationChatId: this.config.gameOfferNotificationChatId, + resetMemberAfterRejoin: this.config.resetMemberAfterRejoin, featureFlags: this.config.featureFlags, afkChannelIds: this.config.afkChannelIds, moderatorRoleIds: this.config.moderatorRoleIds, diff --git a/web/src/assets/i18n/de.json b/web/src/assets/i18n/de.json index a17ac8e9..8c8e20e2 100644 --- a/web/src/assets/i18n/de.json +++ b/web/src/assets/i18n/de.json @@ -455,6 +455,7 @@ "message_delete_timer": "Zeit bis zum löschen einer Botnachricht in sekunden", "moderator_roles": "Moderator Rollen", "notification_chat_id": "Benachrichtungskanal", + "reset_member_after_rejoin": "Mitglied nach erneutem Beitritt zurücksetzen", "short_role_name_only_set_highest_role": "Bei Rollen Kürzeln nur die höchste Rolle verwenden", "team_channel_id": "Team chat", "xp_for_birthday": "XP für Geburtstag", diff --git a/web/src/assets/i18n/en.json b/web/src/assets/i18n/en.json index 66b67e7a..ec26f08d 100644 --- a/web/src/assets/i18n/en.json +++ b/web/src/assets/i18n/en.json @@ -455,6 +455,7 @@ "message_delete_timer": "Time to wait before delete bot messages", "moderator_roles": "Moderator roles", "notification_chat_id": "Notification channel", + "reset_member_after_rejoin": "Reset member after rejoin", "short_role_name_only_set_highest_role": "For role abbreviations use only the highest role", "team_channel_id": "Team chat", "xp_for_birthday": "XP for birthday", -- 2.45.2 From d1a04c537c0be12472f71670ef38b557b24d72ec Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Fri, 15 Dec 2023 15:39:14 +0100 Subject: [PATCH 30/30] Set correct frontend version #460 --- web/package.json | 110 ++++++++++++++++++------------------ web/src/assets/version.json | 12 ++-- 2 files changed, 61 insertions(+), 61 deletions(-) diff --git a/web/package.json b/web/package.json index f303b339..d5dd8bf1 100644 --- a/web/package.json +++ b/web/package.json @@ -1,56 +1,56 @@ { - "name": "web", - "version": "1.2.dev460", - "scripts": { - "ng": "ng", - "update-version": "ts-node update-version.ts", - "prestart": "npm run update-version", - "start": "ng serve", - "prebuild": "npm run update-version", - "build": "ng build", - "watch": "ng build --watch --configuration development", - "test": "ng test", - "gv": "echo $npm_package_version", - "predocker-build": "npm run update-version", - "docker-build": "export VERSION=$npm_package_version; ng build; docker build -t sh-edraft.de/sdb-web:$VERSION .", - "docker-build-dev": "export VERSION=$npm_package_version; ng build --configuration development; docker build -t sh-edraft.de/sdb-web:$VERSION .", - "docker-build-stage": "export VERSION=$npm_package_version; ng build --configuration staging; docker build -t sh-edraft.de/sdb-web:$VERSION ." - }, - "private": true, - "dependencies": { - "@angular/animations": "^15.1.4", - "@angular/common": "^15.1.4", - "@angular/compiler": "^15.1.4", - "@angular/core": "^15.1.4", - "@angular/forms": "^15.1.4", - "@angular/platform-browser": "^15.1.4", - "@angular/platform-browser-dynamic": "^15.1.4", - "@angular/router": "^15.1.4", - "@auth0/angular-jwt": "^5.1.0", - "@microsoft/signalr": "^6.0.9", - "@ngx-translate/core": "^14.0.0", - "@ngx-translate/http-loader": "^7.0.0", - "@types/socket.io-client": "^3.0.0", - "moment": "^2.29.4", - "primeicons": "^6.0.1", - "primeng": "^15.2.0", - "rxjs": "~7.5.0", - "socket.io-client": "^4.5.3", - "zone.js": "~0.11.4" - }, - "devDependencies": { - "@angular-devkit/build-angular": "^15.1.5", - "@angular/cli": "~15.1.5", - "@angular/compiler-cli": "^15.1.4", - "@types/jasmine": "~4.0.0", - "@types/node": "^18.11.9", - "jasmine-core": "~4.1.0", - "karma": "~6.3.0", - "karma-chrome-launcher": "~3.1.0", - "karma-coverage": "~2.2.0", - "karma-jasmine": "~5.0.0", - "karma-jasmine-html-reporter": "~1.7.0", - "tslib": "^2.4.1", - "typescript": "~4.9.5" - } -} \ No newline at end of file + "name": "web", + "version": "1.2.4", + "scripts": { + "ng": "ng", + "update-version": "ts-node update-version.ts", + "prestart": "npm run update-version", + "start": "ng serve", + "prebuild": "npm run update-version", + "build": "ng build", + "watch": "ng build --watch --configuration development", + "test": "ng test", + "gv": "echo $npm_package_version", + "predocker-build": "npm run update-version", + "docker-build": "export VERSION=$npm_package_version; ng build; docker build -t sh-edraft.de/sdb-web:$VERSION .", + "docker-build-dev": "export VERSION=$npm_package_version; ng build --configuration development; docker build -t sh-edraft.de/sdb-web:$VERSION .", + "docker-build-stage": "export VERSION=$npm_package_version; ng build --configuration staging; docker build -t sh-edraft.de/sdb-web:$VERSION ." + }, + "private": true, + "dependencies": { + "@angular/animations": "^15.1.4", + "@angular/common": "^15.1.4", + "@angular/compiler": "^15.1.4", + "@angular/core": "^15.1.4", + "@angular/forms": "^15.1.4", + "@angular/platform-browser": "^15.1.4", + "@angular/platform-browser-dynamic": "^15.1.4", + "@angular/router": "^15.1.4", + "@auth0/angular-jwt": "^5.1.0", + "@microsoft/signalr": "^6.0.9", + "@ngx-translate/core": "^14.0.0", + "@ngx-translate/http-loader": "^7.0.0", + "@types/socket.io-client": "^3.0.0", + "moment": "^2.29.4", + "primeicons": "^6.0.1", + "primeng": "^15.2.0", + "rxjs": "~7.5.0", + "socket.io-client": "^4.5.3", + "zone.js": "~0.11.4" + }, + "devDependencies": { + "@angular-devkit/build-angular": "^15.1.5", + "@angular/cli": "~15.1.5", + "@angular/compiler-cli": "^15.1.4", + "@types/jasmine": "~4.0.0", + "@types/node": "^18.11.9", + "jasmine-core": "~4.1.0", + "karma": "~6.3.0", + "karma-chrome-launcher": "~3.1.0", + "karma-coverage": "~2.2.0", + "karma-jasmine": "~5.0.0", + "karma-jasmine-html-reporter": "~1.7.0", + "tslib": "^2.4.1", + "typescript": "~4.9.5" + } +} diff --git a/web/src/assets/version.json b/web/src/assets/version.json index d19ce170..f776382b 100644 --- a/web/src/assets/version.json +++ b/web/src/assets/version.json @@ -1,7 +1,7 @@ { - "WebVersion": { - "Major": "1", - "Minor": "2", - "Micro": "dev460" - } -} \ No newline at end of file + "WebVersion": { + "Major": "1", + "Minor": "2", + "Micro": "4" + } +} -- 2.45.2