Capture and promptly update when discrim changes

This commit is contained in:
Jeremy Zhang 2018-01-25 11:19:43 +00:00
parent 1954b5e72d
commit ff81c5009d

View File

@ -190,7 +190,7 @@ class Titan(discord.Client):
await self.socketio.on_guild_member_remove(member) await self.socketio.on_guild_member_remove(member)
async def on_member_update(self, memberbefore, memberafter): async def on_member_update(self, memberbefore, memberafter):
if set(memberbefore.roles) != set(memberafter.roles) or memberbefore.avatar != memberafter.avatar or memberbefore.nick != memberafter.nick or memberbefore.name != memberafter.name or memberbefore.status != memberafter.status: if set(memberbefore.roles) != set(memberafter.roles) or memberbefore.avatar != memberafter.avatar or memberbefore.nick != memberafter.nick or memberbefore.name != memberafter.name or memberbefore.discriminator != memberafter.discriminator or memberbefore.status != memberafter.status:
if memberbefore.status == memberafter.status: if memberbefore.status == memberafter.status:
await self.database.update_guild_member(memberafter) await self.database.update_guild_member(memberafter)
await self.socketio.on_guild_member_update(memberafter) await self.socketio.on_guild_member_update(memberafter)