From 7aff15a05534ce11c76494cc15d63e06fb5a9816 Mon Sep 17 00:00:00 2001 From: Jeroen Claassens Date: Tue, 24 Aug 2021 22:19:03 +0200 Subject: [PATCH] typings(MessageEmbed): allow `null` for `setTimestamp` (#6514) --- src/structures/MessageEmbed.js | 3 ++- typings/index.d.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/structures/MessageEmbed.js b/src/structures/MessageEmbed.js index 534223666ddf..61437720d7e7 100644 --- a/src/structures/MessageEmbed.js +++ b/src/structures/MessageEmbed.js @@ -374,7 +374,8 @@ class MessageEmbed { /** * Sets the timestamp of this embed. - * @param {Date|number} [timestamp=Date.now()] The timestamp or date + * @param {Date|number|null} [timestamp=Date.now()] The timestamp or date. + * If `null` then the timestamp will be unset (i.e. when editing an existing {@link MessageEmbed}) * @returns {MessageEmbed} */ setTimestamp(timestamp = Date.now()) { diff --git a/typings/index.d.ts b/typings/index.d.ts index 21c2cdc71257..b2cfae294588 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1297,7 +1297,7 @@ export class MessageEmbed { public setFooter(text: string, iconURL?: string): this; public setImage(url: string): this; public setThumbnail(url: string): this; - public setTimestamp(timestamp?: Date | number): this; + public setTimestamp(timestamp?: Date | number | null): this; public setTitle(title: string): this; public setURL(url: string): this; public spliceFields(index: number, deleteCount: number, ...fields: EmbedFieldData[] | EmbedFieldData[][]): this;