Closed Defelo closed 2 years ago
Do we want to add username
to the out
list in this function ?
Do we want to add
username
to theout
list in this function ?
No, the logging cog currently logs all username and nickname changes. But it does not log the username the user had, when he joined the server.
Just log the username on join, that's all....
The current username can easily be found when pinging the user, no need to add it to out
.
Just log the username on join
Actually, I not getting how to Log?
Actually, the username is already logged on join, but it is not shown in the userlog itself. Just read the name the user had on join from the database and put it into the userlog join entries (you will have to modify the translation string in translations/en.yml for this).
join: Join
async for join in await db.stream(filter_by(Join, member=user_id)):
username_on_join = t.ulog.username_on_join(join.member_name)
out.append((join.timestamp, t.ulog.joined))
ulog:
created: ":sparkles: **Created** this account."
joined: ":tada: **Joined** this server."
left: ":door: **Left** this server."
username_on_join: "`{}`"
Is it right? added username_on_join
You can just add the username placeholder to the ulog.created
translation string instead of creating an new translation
Userlog "join" entries should contain the name the user had when joining the server.