osuAkatsuki / bancho.py

An osu! server for the generic public, optimized for maintainability in modern python
https://akatsuki.gg
MIT License
201 stars 125 forks source link

bug: output for offline users in !user command is confusing #637

Open cmyui opened 4 months ago

cmyui commented 4 months ago

When using the command with an offline user, the "logged in" and "last server interaction" are the time since 1970. We should make these more user-friendly -- and e.g. show "User not online".

22:28 cmyui: !user tsunyoku
22:28 Aika: [Player] tsunyoku (224)
Privileges: ['VERIFIED', 'UNRESTRICTED']
Donator: False
Channels: []
Logged in: 54 years ago
Last server interaction: 54 years ago
osu! build: Unknown | Tourney: False
Silenced: False | Spectating: None
Last /np: None
Recent score: None
Match: None
Spectators: [] | Elapsed: 3.41 msec
cmyui commented 4 months ago

There's also a column in the users table -- latest_activity. We could use this to display the latest activity, without the user needing to be online. This can be fetched using the users_repo.fetch_one method.