fix (Trackers): Ignore bots for workout and study.
This commit is contained in:
@@ -29,7 +29,7 @@ def _scan(guild):
|
||||
finally:
|
||||
last_scan[guild.id] = now
|
||||
|
||||
# Calculuate time since last scan
|
||||
# Calculate time since last scan
|
||||
interval = now - last
|
||||
|
||||
# Discard if it has been more than 20 minutes (discord outage?)
|
||||
@@ -48,6 +48,8 @@ def _scan(guild):
|
||||
# TODO filter out blacklisted users
|
||||
|
||||
for member in members:
|
||||
if member.bot:
|
||||
continue
|
||||
lion = Lion.fetch(guild.id, member.id)
|
||||
|
||||
# Add time
|
||||
|
||||
@@ -168,6 +168,9 @@ async def workout_voice_tracker(client, member, before, after):
|
||||
while not module.ready:
|
||||
asyncio.sleep(0.1)
|
||||
|
||||
if member.bot:
|
||||
return
|
||||
|
||||
# Check whether we are moving to/from a workout channel
|
||||
settings = GuildSettings(member.guild.id)
|
||||
channels = settings.workout_channels.value
|
||||
|
||||
Reference in New Issue
Block a user