From 4955eb3a19491360b06c9b595c7705fb384f1b13 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Wed, 8 Dec 2021 17:42:21 +0100 Subject: [PATCH] Fixed database module --- src/modules/database/database.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/database/database.py b/src/modules/database/database.py index 431a62e..b7fb766 100644 --- a/src/modules/database/database.py +++ b/src/modules/database/database.py @@ -1,3 +1,4 @@ +from ctypes import Union from datetime import datetime import discord @@ -162,12 +163,12 @@ class Database(ModuleABC, OnReadyABC): self._logger.fatal(__name__, f'Server not found in database: {g.id}') for u in g.members: - u: discord.Member = u + u: Union[discord.Member, discord.User] = u if u.bot: self._logger.trace(__name__, f'User {u.id} is ignored, because its a bot') continue - user = self._users.find_user_by_discord_id(u.id) + user = self._users.find_user_by_discord_id_and_server_id(u.id, server.server_id) if user is not None: continue