fix (Trackers): Ignore bots for workout and study.

This commit is contained in:
2021-09-20 10:01:26 +03:00
parent 0c3f752e5a
commit ad773c95d3
2 changed files with 6 additions and 1 deletions

View File

@@ -29,7 +29,7 @@ def _scan(guild):
finally: finally:
last_scan[guild.id] = now last_scan[guild.id] = now
# Calculuate time since last scan # Calculate time since last scan
interval = now - last interval = now - last
# Discard if it has been more than 20 minutes (discord outage?) # Discard if it has been more than 20 minutes (discord outage?)
@@ -48,6 +48,8 @@ def _scan(guild):
# TODO filter out blacklisted users # TODO filter out blacklisted users
for member in members: for member in members:
if member.bot:
continue
lion = Lion.fetch(guild.id, member.id) lion = Lion.fetch(guild.id, member.id)
# Add time # Add time

View File

@@ -168,6 +168,9 @@ async def workout_voice_tracker(client, member, before, after):
while not module.ready: while not module.ready:
asyncio.sleep(0.1) asyncio.sleep(0.1)
if member.bot:
return
# Check whether we are moving to/from a workout channel # Check whether we are moving to/from a workout channel
settings = GuildSettings(member.guild.id) settings = GuildSettings(member.guild.id)
channels = settings.workout_channels.value channels = settings.workout_channels.value