mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-15 02:21:21 +01:00
Fix duplicates embed members in sidebar
This commit is contained in:
parent
cb5d8dc407
commit
d09ede5681
@ -191,8 +191,8 @@ def get_online_discord_users(guild_id):
|
|||||||
|
|
||||||
def get_online_embed_users(guild_id):
|
def get_online_embed_users(guild_id):
|
||||||
time_past = (datetime.datetime.now() - datetime.timedelta(seconds = 120)).strftime('%Y-%m-%d %H:%M:%S')
|
time_past = (datetime.datetime.now() - datetime.timedelta(seconds = 120)).strftime('%Y-%m-%d %H:%M:%S')
|
||||||
unauths = db.session.query(UnauthenticatedUsers).filter(UnauthenticatedUsers.last_timestamp > time_past, UnauthenticatedUsers.revoked == False).all()
|
unauths = db.session.query(UnauthenticatedUsers).filter(UnauthenticatedUsers.last_timestamp > time_past, UnauthenticatedUsers.revoked == False, UnauthenticatedUsers.guild_id == guild_id).all()
|
||||||
auths = db.session.query(AuthenticatedUsers).filter(AuthenticatedUsers.last_timestamp > time_past).all()
|
auths = db.session.query(AuthenticatedUsers).filter(AuthenticatedUsers.last_timestamp > time_past, AuthenticatedUsers.guild_id == guild_id).all()
|
||||||
users = {'unauthenticated':[], 'authenticated':[]}
|
users = {'unauthenticated':[], 'authenticated':[]}
|
||||||
for user in unauths:
|
for user in unauths:
|
||||||
meta = {
|
meta = {
|
||||||
|
Loading…
Reference in New Issue
Block a user