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