Fixed database module
This commit is contained in:
parent
9d17070d02
commit
4955eb3a19
@ -1,3 +1,4 @@
|
|||||||
|
from ctypes import Union
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
import discord
|
import discord
|
||||||
@ -162,12 +163,12 @@ class Database(ModuleABC, OnReadyABC):
|
|||||||
self._logger.fatal(__name__, f'Server not found in database: {g.id}')
|
self._logger.fatal(__name__, f'Server not found in database: {g.id}')
|
||||||
|
|
||||||
for u in g.members:
|
for u in g.members:
|
||||||
u: discord.Member = u
|
u: Union[discord.Member, discord.User] = u
|
||||||
if u.bot:
|
if u.bot:
|
||||||
self._logger.trace(__name__, f'User {u.id} is ignored, because its a bot')
|
self._logger.trace(__name__, f'User {u.id} is ignored, because its a bot')
|
||||||
continue
|
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:
|
if user is not None:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user