From c06cb02cd60cf6162735634dd2c2e1483d2e4884 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sun, 24 Sep 2023 17:05:42 +0200 Subject: [PATCH] Added logic to set default role #360 --- kdb-bot/src/bot_core/service/client_utils_service.py | 2 +- kdb-bot/src/bot_core/service/data_integrity_service.py | 2 +- kdb-bot/src/modules/base/events/base_on_member_join_event.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kdb-bot/src/bot_core/service/client_utils_service.py b/kdb-bot/src/bot_core/service/client_utils_service.py index 8fb2baa6..42d0c65c 100644 --- a/kdb-bot/src/bot_core/service/client_utils_service.py +++ b/kdb-bot/src/bot_core/service/client_utils_service.py @@ -230,7 +230,7 @@ class ClientUtilsService(ClientUtilsABC): default_role = member.guild.get_role(settings.default_role_id) if default_role in member.roles: return - + await member.add_roles(default_role) except Exception as e: diff --git a/kdb-bot/src/bot_core/service/data_integrity_service.py b/kdb-bot/src/bot_core/service/data_integrity_service.py index e8f4b1de..8290cb88 100644 --- a/kdb-bot/src/bot_core/service/data_integrity_service.py +++ b/kdb-bot/src/bot_core/service/data_integrity_service.py @@ -45,7 +45,7 @@ class DataIntegrityService: user_joins_vc: UserJoinedVoiceChannelRepositoryABC, user_joined_gs: UserJoinedGameServerRepositoryABC, achievement_service: AchievementService, - client_utils: ClientUtilsABC, + client_utils: ClientUtilsABC, dtp: DateTimeOffsetPipe, ): self._config = config diff --git a/kdb-bot/src/modules/base/events/base_on_member_join_event.py b/kdb-bot/src/modules/base/events/base_on_member_join_event.py index ec7a7320..79568f4b 100644 --- a/kdb-bot/src/modules/base/events/base_on_member_join_event.py +++ b/kdb-bot/src/modules/base/events/base_on_member_join_event.py @@ -35,7 +35,7 @@ class BaseOnMemberJoinEvent(OnMemberJoinABC): users: UserRepositoryABC, servers: ServerRepositoryABC, user_joins: UserJoinedServerRepositoryABC, - client_utils: ClientUtilsABC, + client_utils: ClientUtilsABC, translate: TranslatePipe, ): OnMemberJoinABC.__init__(self)