mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
fix(Message): Message#createdTimestamp uses deconstructed message id to get timestamp (#4632)
This commit is contained in:
parent
317f24076e
commit
2be68e4125
1 changed files with 2 additions and 1 deletions
|
|
@ -13,6 +13,7 @@ const Collection = require('../util/Collection');
|
|||
const { MessageTypes } = require('../util/Constants');
|
||||
const MessageFlags = require('../util/MessageFlags');
|
||||
const Permissions = require('../util/Permissions');
|
||||
const SnowflakeUtil = require('../util/Snowflake');
|
||||
const Util = require('../util/Util');
|
||||
|
||||
/**
|
||||
|
|
@ -115,7 +116,7 @@ class Message extends Base {
|
|||
* The timestamp the message was sent at
|
||||
* @type {number}
|
||||
*/
|
||||
this.createdTimestamp = new Date(data.timestamp).getTime();
|
||||
this.createdTimestamp = SnowflakeUtil.deconstruct(this.id).timestamp;
|
||||
|
||||
/**
|
||||
* The timestamp the message was last edited at (if applicable)
|
||||
|
|
|
|||
Loading…
Reference in a new issue