Home > Mobile >  Discordjs v14 TypeError: (intermediate value).setColor is not a function
Discordjs v14 TypeError: (intermediate value).setColor is not a function

Time:07-20

I am trying to create a command where it returns an embedded message when /ping command is typed and I am getting this error.

      .setColor("#FF0000")
       ^

TypeError: (intermediate value).setColor is not a function
    at Object.run (C:\Users\dhart\Desktop\Projects\ExistentialThreat\commands\Info\ping.js:9:8)
    at Client.<anonymous> (C:\Users\dhart\Desktop\Projects\ExistentialThreat\events\interactionCreate.js:24:9)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

My code is:

const { Embed } = require("discord.js");

module.exports = {
  name: "ping",
  description: "Returns websocket latency",

  run: async (client, interaction) => {
    const embed = new Embed()
      .setColor("#FF0000")
      .setTitle("           
  • Related