mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
feat(MessageEmbed): allow setTimestamp to take a timestamp (#2875)
* feat: allow MessageEmbed#setTimestamp to take a timestamp * fix the dumb i did
This commit is contained in:
@@ -267,11 +267,12 @@ class MessageEmbed {
|
||||
|
||||
/**
|
||||
* Sets the timestamp of this embed.
|
||||
* @param {Date} [timestamp=current date] The timestamp
|
||||
* @param {Date|number} [timestamp=Date.now()] The timestamp or date
|
||||
* @returns {MessageEmbed}
|
||||
*/
|
||||
setTimestamp(timestamp = new Date()) {
|
||||
this.timestamp = timestamp.getTime();
|
||||
setTimestamp(timestamp = Date.now()) {
|
||||
if (timestamp instanceof Date) timestamp = timestamp.getTime();
|
||||
this.timestamp = timestamp;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user