From 49dd52c8dc4e260d7d9b3ee445c8172fe0b3f03f Mon Sep 17 00:00:00 2001 From: bobloy Date: Tue, 3 Nov 2020 10:02:23 -0500 Subject: [PATCH] Regular iteration --- lseen/lseen.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lseen/lseen.py b/lseen/lseen.py index afacd48..b5dc43c 100644 --- a/lseen/lseen.py +++ b/lseen/lseen.py @@ -46,11 +46,9 @@ class LastSeen(Cog): async def _initalize_tracking(self, guild: discord.Guild): now = datetime.utcnow().isoformat() - online_members = { - member.id: now for member in guild.members if member.status != self.offline_status - } - async with self.config.all_members(guild) as m: - m.update(online_members) + for member in guild.members: + if member.status != self.offline_status: + await self.config.member(member).seen.set(now) @staticmethod def get_date_time(s):