How do I @here with an attachment?

I’m trying to make say command with canvas to output an image with @here mention together, but the command only shows the image without doing the mention. what I have tried:

message.channel.send(`@heren`+attachment);

Answer

Separate the message content and the attachement with a ,. You can just use this:

message.channel.send("@here", {
   files: ["./yourfile.txt"],
});

Also remember that discord will always instantly show images in the chat instead of just the file. That’s the normal Discord behaviour. It’s as you would send an image from an user account. You cannot change that with discord.js.