Fixed database module
This commit is contained in:
parent
9d17070d02
commit
4955eb3a19
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user