.setTimestamp is not a function

client.on("messageCreate", (message) => {
if (message.content.startsWith("ping")) {
const exampleEmbed = new EmbedBuilder()
.setColor('#2ecc71') // lime green
.setTitle('General Rules')
.setDescription([
'These rules are in effect in the entire server, regardless of the channel.',
'Breaking these rules will be met with punishments from Moderators & Administators.',
'You are expected to follow these.',
'
client.on("messageCreate", (message) => {
if (message.content.startsWith("ping")) {
const exampleEmbed = new EmbedBuilder()
.setColor('#2ecc71') // lime green
.setTitle('General Rules')
.setDescription([
'These rules are in effect in the entire server, regardless of the channel.',
'Breaking these rules will be met with punishments from Moderators & Administators.',
'You are expected to follow these.',
'
' + '1. No spam or self-promotion (server invites, advertisements, etc) without permission from a staff member. This includes DMing fellow members.' + '\n\n2. Do not self-promote or advertise other servers, services or products.' + '
'
.setTimestamp()
].join('\n'));

message.channel.send({ embeds: [exampleEmbed] });
}
});
'
.setTimestamp()
].join('\n'));

message.channel.send({ embeds: [exampleEmbed] });
}
});
4 Replies
d.js toolkit
d.js toolkit16mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Michael Knowles
Michael KnowlesOP16mo ago
Says .setTimestamp is not a function (I'm using string literals that's why it's like that)
treble/luna
treble/luna16mo ago
because you're doing <String>.setTimestamp() you're inside your setDescription()
Michael Knowles
Michael KnowlesOP16mo ago
Thanks
Want results from more Discord servers?
Add your server