I'm trying to gather a user's response to my bot's message, but it's all happening in DMs. How can I complete this task with Discord.js (13.x)?
const Discord = require('discord.js');
const intents = new Discord.Intents(32767);
const client = new Discord.Client({ intents });
const config = require('./config.json');
const privateMessage = require('./private-message');
client.on('ready', () => {
console.log('Ready!');
privateMessage(client, '!match', 'hello please enter your birthday as this following format day/month ')
})
client.login(config.token)
You would want to use a collector for that. There is a easy guide on the discord.js website.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.