The line where i want to mention the user with @
first part of the code1 2nn part of the code after the mention i want to apply2 I am developing a discord bot and I want the bot to mention the user that applied the command. I can show you more of the code. It is a bit complicated. I tried many times Mention.user and some other common answers but nothing happened.
ps. Edit: i provided 2 more images with the code if thats enough :)
If you go to the discord.js site and click on
Documentation
in the top right, it will bring you to a page where you can learn about all of the objects in the discord.js api.In your
client.on("message")
, message is defined, it is a message object, so to find that in the docs scroll down and look on the left side forMessage
, and click on it. You can now see all of the attributes that class has, it has anauthor
, which the docs say is of typeUser
. I have told you if you send a user object in a message, it will mention the user. So, sendmessage.author
and tada!