How to reply to any DMs sent to the bot?
问题 I am trying to make my bot replying to any DM sent to it. So I currently have this: client.on('msg', () => { if (msg.channel.DMChannel) { msg.reply("You are DMing me now!"); } }); But unfortunately, it does not reply to any DM. I've tried to replace msg.channel.DMChannel with msg.channel.type == 'dm' but this didn't work. I also tried to replace msg.reply with msg.author.send and msg.channel.send but they all didn't work. Any help would be appreciated. Thanks! 回答1: On the official