mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Fixing MessageEmbed's timestamp transforming (#1688)
when sending to discord Also storing the timestamp in milliseconds when using setTimestamp
This commit is contained in:
@@ -260,7 +260,7 @@ class MessageEmbed {
|
||||
* @returns {MessageEmbed} This embed
|
||||
*/
|
||||
setTimestamp(timestamp = new Date()) {
|
||||
this.timestamp = timestamp;
|
||||
this.timestamp = timestamp.getTime();
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -292,7 +292,7 @@ class MessageEmbed {
|
||||
type: 'rich',
|
||||
description: this.description,
|
||||
url: this.url,
|
||||
timestamp: this.timestamp,
|
||||
timestamp: this.timestamp ? new Date(this.timestamp) : null,
|
||||
color: this.color,
|
||||
fields: this.fields,
|
||||
files: this.files,
|
||||
|
||||
Reference in New Issue
Block a user