mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
fix created timestamp precision (#1241)
* fix created timestamp precision * perf * Update Snowflake.js * gawdl3y was butthurt * Update Snowflake.js
This commit is contained in:
committed by
Schuyler Cebulskie
parent
21babf8859
commit
2897692cf1
@@ -1,6 +1,7 @@
|
||||
const TextBasedChannel = require('./interface/TextBasedChannel');
|
||||
const Constants = require('../util/Constants');
|
||||
const Presence = require('./Presence').Presence;
|
||||
const Snowflake = require('../util/Snowflake');
|
||||
|
||||
/**
|
||||
* Represents a user on Discord.
|
||||
@@ -76,7 +77,7 @@ class User {
|
||||
* @readonly
|
||||
*/
|
||||
get createdTimestamp() {
|
||||
return (this.id / 4194304) + 1420070400000;
|
||||
return Snowflake.deconstruct(this.id).timestamp;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user