How do I make my command not mention the user?

Viewed 69

I just started coding my Discord bot and I made a command that replies to every message that isn’t sent by a bot. When I tried it in DMs it works fine, but when I tried it in my server it would mention the user before the command. In the DM it would say just “test”, but in the server it would say something like “@ExampleUser, test”.

Is there a way I can fix this? Here’s my code:

const Discord = require('discord.js');
const client = new Discord.Client();

client.on("message", (message) => {
  if (message.author.bot) return; 
  return message.reply("test") 
});
3 Answers

Solution

use message.channel.send('string'); instead of .reply()

It's very easy :)

Instead of saying message.reply('message') you just have to say message.channel.send('message')

Related