Closed Slydelix closed 5 years ago
A simple bit-shift and addition calculation will give you the time since epoch (as demonstrated in the docs):
(value >> 22) + 1420070400000
You can then more easily convert this into a DateTime object.
Furthermore, the DiscordObjects namespace's' classes should only contain models of data, similar to the MVC architecture. Due to this, it would be better to move this functionality out to a "helper" class.
Okay, I'll look into it and probably create a new pull request with updated stuff
This works by calculating the age from the user's ID (more info at link)
Returns user's account creation date in DateTime (UTC)