mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +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
@@ -6,6 +6,7 @@ const GuildMember = require('./GuildMember');
|
||||
const Constants = require('../util/Constants');
|
||||
const Collection = require('../util/Collection');
|
||||
const Util = require('../util/Util');
|
||||
const Snowflake = require('../util/Snowflake');
|
||||
|
||||
/**
|
||||
* Represents a guild (or a server) on Discord.
|
||||
@@ -216,7 +217,7 @@ class Guild {
|
||||
* @readonly
|
||||
*/
|
||||
get createdTimestamp() {
|
||||
return (this.id / 4194304) + 1420070400000;
|
||||
return Snowflake.deconstruct(this.id).timestamp;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user