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):
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):

Loading…
Cancel
Save