0

I'm following the devdungeon tutorial for making a discord bot. (they use version 11 in the video, i'm using version 12, and yes i have resolved all the version difference issues before this current issue). I'm on the part where, when you send a message, the bot will echo your message with extra stuff like mentioning the author. i've followed the code exactly, but when i run my code and test the bot, it only responds with the other stuff and not the message it's supposed to echo.

snippet:

receivedMessage.channel.send("Message received from " + receivedMessage.author.toString() + 
  ": " + receivedMessage.content)

everything except for receivedMessage.content works as intended.

screenshot of what happens

I thought it might be some discord policy update for preventing bots acquiring private messages, but from what i read that only applies to official verified bots.

anybody know why this is happening?

here's the full function:

client.on('message', (receivedMessage) => {
  if (receivedMessage.author == client.user) {
    return
  }

  receivedMessage.channel.send("Message received from " + receivedMessage.author.toString() + 
  ": " + receivedMessage.content)
})

i've tried changing some properties that may have been changed from v11 to v12, but to no avail.

Kana
  • 1
  • 2
  • nevermind im just gonna download version 14 and specifically look for version 14 tutorials – Kana Dec 29 '22 at 08:27

0 Answers0