mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +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
|
* @returns {MessageEmbed} This embed
|
||||||
*/
|
*/
|
||||||
setTimestamp(timestamp = new Date()) {
|
setTimestamp(timestamp = new Date()) {
|
||||||
this.timestamp = timestamp;
|
this.timestamp = timestamp.getTime();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -292,7 +292,7 @@ class MessageEmbed {
|
|||||||
type: 'rich',
|
type: 'rich',
|
||||||
description: this.description,
|
description: this.description,
|
||||||
url: this.url,
|
url: this.url,
|
||||||
timestamp: this.timestamp,
|
timestamp: this.timestamp ? new Date(this.timestamp) : null,
|
||||||
color: this.color,
|
color: this.color,
|
||||||
fields: this.fields,
|
fields: this.fields,
|
||||||
files: this.files,
|
files: this.files,
|
||||||
|
|||||||
Reference in New Issue
Block a user