ExpectedValidationError from EmbedBuilder().setTimestamp(variable)
(using typescript) while creating an embed in an interaction handler and setting the Timestamp on it, the following Error(s) are thrown
CombinedError (3) Received one or more errors 1 ExpectedValidationError > s.literal(V) | Expected values to be equals | | Expected: | | null | | Received: | | '1695404406973' 2 ValidationError > s.number | Expected a number primitive | | Received: | | '1695404406973' 3 ValidationError > s.date | Expected a Date | | Received: | | '1695404406973'
CombinedError (3) Received one or more errors 1 ExpectedValidationError > s.literal(V) | Expected values to be equals | | Expected: | | null | | Received: | | '1695404406973' 2 ValidationError > s.number | Expected a number primitive | | Received: | | '1695404406973' 3 ValidationError > s.date | Expected a Date | | Received: | | '1695404406973'
the code throwing is equivalent to the following:
export class someClass { public createdAt!: number}//...const embed = new EmbedBuilder() //set a bold title .setTitle('**EmbedTitle**') .setDescription('SomeLongText') .setFooter({ text: 'FooterText' }) .setTimestamp(classInstance.createdAt)
export class someClass { public createdAt!: number}//...const embed = new EmbedBuilder() //set a bold title .setTitle('**EmbedTitle**') .setDescription('SomeLongText') .setFooter({ text: 'FooterText' }) .setTimestamp(classInstance.createdAt)