Regular iteration

lseen_develop
bobloy 4 years ago
parent 25e690f238
commit 49dd52c8dc

@ -46,11 +46,9 @@ class LastSeen(Cog):
async def _initalize_tracking(self, guild: discord.Guild): async def _initalize_tracking(self, guild: discord.Guild):
now = datetime.utcnow().isoformat() now = datetime.utcnow().isoformat()
online_members = { for member in guild.members:
member.id: now for member in guild.members if member.status != self.offline_status if member.status != self.offline_status:
} await self.config.member(member).seen.set(now)
async with self.config.all_members(guild) as m:
m.update(online_members)
@staticmethod @staticmethod
def get_date_time(s): def get_date_time(s):

Loading…
Cancel
Save