Skip to content

Commit

Permalink
fix tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
Zennara committed Jan 8, 2022
1 parent 118539a commit 5a02ea6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1512,6 +1512,9 @@ async def on_member_join(member):
#print(f"Inviter: {invite.inviter}")
invites[member.guild.id] = invites_after_join
break

#write cache
invites[member.guild.id] = await member.guild.invites()

#append join code
if str(member.id) not in data.keys():
Expand Down Expand Up @@ -1556,8 +1559,8 @@ async def on_member_join(member):

@client.event
async def on_member_remove(member):
#wait for getInvites()
await asyncio.sleep(1.1)
#write cache
invites[member.guild.id] = await member.guild.invites()

if str(member.guild.id) == guild_id:
#add to leaves
Expand Down

0 comments on commit 5a02ea6

Please sign in to comment.