0
0
01mayer012019-01-10 16:13:03
JavaScript
01mayer01, 2019-01-10 16:13:03

How to get a Discord bot to mention you?

const Discord = require("discord.js");
const client = new Discord.Client();
client.login("my token");
client.on('message', (message) =>{
if(message.content == "!WO mine")
{
message.channel.send("m!mine");
}
});
client.on('message', (message) =>{
if(message.content == "!WO sell")
{
message.channel.send("m!sell all");
}
});
client.on('message', (message) =>{
if(message.content == "!WO trade")
{
message.channel.send("m!trade @Moinbox#8404");
but when I write !WO trade he just writes @Moinik#8404 without mentioning how to make him mention me
5c37461b764fa559503271.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Michael, 2019-01-10
@01mayer01

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

client.login("мой токен");

client.on('message', (message) => {
    if (message.content == "!WO trade") {
        message.reply('message here');
    }
});

F
fgvnovoross, 2019-05-30
@fgvnovoross

In the example above, the answer should be:
and what without a comma, here's how you can: another variation or you can do it like this :)

N
nannote, 2019-08-27
@nannote

you can make an array,
const Discord = require("discord.js");
const client = new Discord.Client();
client.login("my token");
client.on('message', (message) => {
if (message.content == "!WO trade") {
let mtrade = message.author.username;
message.channel.send(`m!trade ${mtrade } `);
}
});
//mtrade array is just where you put the name, if you don't like it, change it, but replace it after let and in message.channel.send

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question