diff --git a/kdb-bot/src/modules/base/events/base_on_voice_state_update_event_scheduled_event_bonus.py b/kdb-bot/src/modules/base/events/base_on_voice_state_update_event_scheduled_event_bonus.py index 641f8ddb..fe5195c9 100644 --- a/kdb-bot/src/modules/base/events/base_on_voice_state_update_event_scheduled_event_bonus.py +++ b/kdb-bot/src/modules/base/events/base_on_voice_state_update_event_scheduled_event_bonus.py @@ -7,8 +7,6 @@ from cpl_discord.events import OnVoiceStateUpdateABC from bot_core.helper.event_checks import EventChecks from bot_data.abc.server_repository_abc import ServerRepositoryABC from bot_data.abc.user_repository_abc import UserRepositoryABC -from modules.base.abc.base_helper_abc import BaseHelperABC -from modules.base.configuration.base_server_settings import BaseServerSettings from modules.base.service.event_service import EventService @@ -17,7 +15,6 @@ class BaseOnVoiceStateUpdateEventScheduledEventBonus(OnVoiceStateUpdateABC): self, config: ConfigurationABC, logger: LoggerABC, - base_helper: BaseHelperABC, servers: ServerRepositoryABC, users: UserRepositoryABC, events: EventService, @@ -26,7 +23,6 @@ class BaseOnVoiceStateUpdateEventScheduledEventBonus(OnVoiceStateUpdateABC): OnVoiceStateUpdateABC.__init__(self) self._config = config self._logger = logger - self._base_helper = base_helper self._servers = servers self._users = users self._events = events diff --git a/kdb-bot/src/modules/base/service/event_service.py b/kdb-bot/src/modules/base/service/event_service.py index d5c77360..30b19d96 100644 --- a/kdb-bot/src/modules/base/service/event_service.py +++ b/kdb-bot/src/modules/base/service/event_service.py @@ -8,9 +8,8 @@ from cpl_query.extension import List from bot_data.abc.server_repository_abc import ServerRepositoryABC from bot_data.abc.user_repository_abc import UserRepositoryABC -from modules.base.configuration.base_server_settings import BaseServerSettings +from bot_data.model.server_config import ServerConfig from modules.base.model.active_event import ActiveEvent -from modules.base.service.base_helper_service import BaseHelperService class EventService: @@ -18,14 +17,12 @@ class EventService: self, config: ConfigurationABC, logger: LoggerABC, - base_helper: BaseHelperService, servers: ServerRepositoryABC, users: UserRepositoryABC, db: DatabaseContextABC, ): self._config = config self._logger = logger - self._base_helper = base_helper self._servers = servers self._users = users self._db = db @@ -59,7 +56,7 @@ class EventService: self._logger.debug(__name__, f"Module {type(self)} stopped") return - settings: BaseServerSettings = self._base_helper.get_config(server.discord_id) + settings: ServerConfig = self._config.get_configuration(f"ServerConfig_{server.discord_id}") user.xp += settings.xp_per_event_participation self._users.update_user(user) self._db.save_changes()