From f8992638d443321d4bc8476d2cf21d29f080c82e Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sun, 9 Oct 2022 17:26:22 +0200 Subject: [PATCH] Smaller bugfixes --- src/modules/base/base_module.py | 2 +- src/modules/base/events/base_on_message_event.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/base/base_module.py b/src/modules/base/base_module.py index d4257cd8..4ea1ed85 100644 --- a/src/modules/base/base_module.py +++ b/src/modules/base/base_module.py @@ -39,6 +39,6 @@ class BaseModule(ModuleABC): self._dc.add_event(DiscordEventTypesEnum.on_command.value, BaseOnCommandEvent) self._dc.add_event(DiscordEventTypesEnum.on_command_error.value, BaseOnCommandErrorEvent) self._dc.add_event(DiscordEventTypesEnum.on_member_join.value, BaseOnMemberJoinEvent) - self._dc.add_event(DiscordEventTypesEnum.on_member_join.value, BaseOnMemberRemoveEvent) + self._dc.add_event(DiscordEventTypesEnum.on_member_remove.value, BaseOnMemberRemoveEvent) self._dc.add_event(DiscordEventTypesEnum.on_message.value, BaseOnMessageEvent) self._dc.add_event(DiscordEventTypesEnum.on_voice_state_update.value, BaseOnVoiceStateUpdateEvent) diff --git a/src/modules/base/events/base_on_message_event.py b/src/modules/base/events/base_on_message_event.py index ee8fcdbc..7f6cb926 100644 --- a/src/modules/base/events/base_on_message_event.py +++ b/src/modules/base/events/base_on_message_event.py @@ -53,7 +53,7 @@ class BaseOnMessageEvent(OnMessageABC): user: Optional[User] = None try: - user = self._users.get_user_by_discord_id_and_server_id(dc_user_id, server.server_id) + user = self._users.find_user_by_discord_id_and_server_id(dc_user_id, server.server_id) except Exception as e: self._logger.error(__name__, f'Cannot get user {dc_user_id}', e) return