所以我想问我必须写什么,以便我的机器人对他发送的他自己的 dm 做出反应
const Discord = require('discord.js');
const { prefix, token } = require('./config.json');
const client = new Discord.Client();
client.on('ready', () => {
console.log('Ready!');
})
try{
client.on('guildMemberAdd', member => {
member.send(`Hello ${member}, welcome to the PotatoHost Server!
I want to help you and so my question is: Do you want to buy a server or do you need more informations first? \n
A: I want to buy a server
B: I need more informations first \n
Please react to this message with A or B.`);
message.react('')
})} catch(error){
member.guild.channels.get("699374469977735208").send(`Hello ${member}, welcome to the PotatoHost Server!`);
}
client.login(token);