I want to add a feature to the bot, to contact a user in private with his id in parameter.
I already tried this:
sendMessage(idUser, "mesage")
but it doesn't work.
I have this error:
"sendMessage is not defined"
I want to add a feature to the bot, to contact a user in private with his id in parameter.
I already tried this:
sendMessage(idUser, "mesage")
but it doesn't work.
I have this error:
"sendMessage is not defined"
Try message.author.send("Your message here");
This takes the author of the sent message and sends a message to them.
Please note for the future, however, that sendMessage is depreciated in discord.js. Instead, just use send.
Yeah message.author.send("MESSAGE")
should work
Also a little handy tip \n
makes a new line if your making lines of text :D