I'm trying to make my discord.js bot send a message when it is pinged. I was unsure how to do this so I referred to this code:
client.on('message', message => {
if (message.content === '<@745648345216712825>') {
message.channel.send('Message Here');
}
});
However, this doesn't work.
Also, is it possible that my bot responds when a person mentions a specific user for example if I am mentioned by the user anywhere in a message the bot responds? If yes, can you show me how to do it?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…