#.setTimestamp is not a function

6 messages · Page 1 of 1 (latest)

inland kelp
#
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] });
      }
    });
worthy oasisBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • Not a discord.js issue? Check out #1081585952654360687.
  • 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!
  • Marked as resolved by OP
inland kelp
#

Says .setTimestamp is not a function

#

(I'm using string literals that's why it's like that)

inland coyote
#

because you're doing <String>.setTimestamp()

#

you're inside your setDescription()