[Solved] How to tag users using Discord.JS?


You have two options.

You can either use the toString method on the User object, or form the mention yourself using the user’s ID.

Here’s an example using toString:

client.on("message", => {
    const channel = message.channel;
    channel.send(message.author.toString());
});

And here’s an example using the ID

client.on("message", => {
    const channel = message.channel;
    channel.send("<@" + message.author.id + ">");
});

solved How to tag users using Discord.JS?