see if discord message is in dm discord.js
if(message.channel.type === 'dm'){
message.channel.send("Pog");
}
see if discord message is in dm discord.js
if(message.channel.type === 'dm'){
message.channel.send("Pog");
}
dm message collector discordjs
client.on('message', message => {
if (message.content == `!collect`) {
// Create a message collector
const filter = m => (m.content.includes('discord') && m.author.id != client.user.id);
const channel = message.channel;
const collector = channel.createMessageCollector(filter, { time: 10000 });
console.log("collector started");
collector.on('collect', m => console.log(`Collected ${m.content}`));
collector.on('end', collected => console.log(`Collected ${collected.size} items`));
}
});
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us