I'm not really experienced with discord.js and node.js but I want to know how I log DMs being sent to the bot to the console. This is the code I'm using to send messages to different people.
case 'senddm':
mention = msg.mentions.users.first();
msg.delete();
if (mention == null) { return; }
mentionMessage = msg.content.slice(9);
mention.sendMessage(mentionMessage);
console.log(`Send message: ${mentionMessage}`)
break;
package.jsonfile - Syntle