File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -140,10 +140,11 @@ class RichEmbed {
140
140
141
141
/**
142
142
* Sets the timestamp of this embed.
143
- * @param {Date } [timestamp=new Date()] The timestamp
143
+ * @param {Date|number } [timestamp=Date.now ()] The timestamp or date
144
144
* @returns {RichEmbed } This embed
145
145
*/
146
- setTimestamp ( timestamp = new Date ( ) ) {
146
+ setTimestamp ( timestamp = Date . now ( ) ) {
147
+ if ( timestamp instanceof Date ) timestamp = timestamp . getTime ( ) ;
147
148
this . timestamp = timestamp ;
148
149
return this ;
149
150
}
Original file line number Diff line number Diff line change @@ -1030,7 +1030,7 @@ declare module 'discord.js' {
1030
1030
public setFooter ( text : StringResolvable , icon ?: string ) : this;
1031
1031
public setImage ( url : string ) : this;
1032
1032
public setThumbnail ( url : string ) : this;
1033
- public setTimestamp ( timestamp ?: Date ) : this;
1033
+ public setTimestamp ( timestamp ?: Date | number ) : this;
1034
1034
public setTitle ( title : StringResolvable ) : this;
1035
1035
public setURL ( url : string ) : this;
1036
1036
}
You can’t perform that action at this time.
0 commit comments