tweak: Update nickname by touch
This commit is contained in:
@@ -62,7 +62,12 @@ class ProfilesCog(LionCog):
|
||||
profile = await UserProfile.create(**args)
|
||||
await DiscordProfileLink.create(profileid=profile.profileid, userid=user.id)
|
||||
elif touch:
|
||||
await profile.update(last_seen=utc_now())
|
||||
# TODO: Should be factored into nickname_hint or similar
|
||||
# TODO: display_name may be server-local
|
||||
args = {}
|
||||
if user.display_name is not None and user.display_name != profile.nickname:
|
||||
args["nickname"] = user.display_name
|
||||
await profile.update(last_seen=utc_now(), **args)
|
||||
|
||||
return profile
|
||||
|
||||
|
||||
Reference in New Issue
Block a user