Skip to content

How to make bot Whent, the bot

I have this code but I have errors

client.on("message", (message) => {


You have few errors in code, first addField method takes 2 parameters, and both are type of string, setFooter also. client.users.get("404968772969955329").send(yumz) grabs user(visible by bot) with id 404968772969955329 and sends him a direct message, so if you want to send message direct to guild channel you’ll need something like this:

client.on("message", (message) => {
  if ( === "dm") {
    if ( != {
      let yumz = new Discord.RichEmbed()
      .setTitle("Direct Message To The Bot")
      .addField("Sent By",
      .addField('Message:', message.content)
      .setFooter('DM Bot Messages | DM Logs')
      client.channels.find('id','404968772969955329').send(yumz) // channel id