I\'m using the discord.js library and node.js to create a Discord bot that facilitates poker. It is functional except the hands are shown to everyone, and I need to loop thr
To send a message to a user you first need a User instance representing the user you want to send the message to.
User instance from a message the user sent by
doing message.autorUser instance from a user id with client.fetchUserOnce you got a user instance you can send the message with .send
client.on('message', (msg) => {
if (!msg.author.bot) msg.author.send('ok ' + msg.author.id);
});
client.fetchUser('487904509670337509', false).then((user) => {
user.send('heloo');
});