Direct message not being sent

The bot is supposed to send a direct message to the user if he used a blacklisted word in his message. I’m using discord.js@13.0.0. Part of the code: client.on('messageCreate', async (message) => { if (message.author.bot) return; if (blacklist.some(word => message.content.toLowerCase().includes(word))) { handleBlacklistedWord(message); } }); async function handleBlacklistedWord(message) { await message.delete(); const duration = 'Undefined, temporary.'; const reason = 'Using blacklisted words.'; const userEmbed = new MessageEmbed() .setTitle('You have been muted.') .setDescription(You used a blacklisted word in your message. Moderators will review the message to make the final decision.\n**Duration - ** ${duration}\n**Reason - ** ${reason}\n**Message Content - ** \${message.content}``) .setColor('#aeaba8') .setFooter('Auto-Moderator'); Thank you.
13 Replies
d.js toolkit
d.js toolkit10mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Unknown User
Unknown User10mo ago
Message Not Public
Sign In & Join Server To View
treble/luna
treble/luna10mo ago
also update your djs version
Ali
Ali10mo ago
Working now!
Ali
Ali10mo ago
Oh I get it
treble/luna
treble/luna10mo ago
because it will crash as i dont think 13.0.0 handles the new text in voice channels well
Ali
Ali10mo ago
Hmmm
Unknown User
Unknown User10mo ago
Message Not Public
Sign In & Join Server To View
Ali
Ali10mo ago
Thank you all!
Ali
Ali10mo ago
@thee2d @luna🌈, How can I make it like this? 🙂
Ali
Ali10mo ago
Like 1 minute ago etc
d.js docs
d.js docs10mo ago
guide Popular Topics: Timestamps read more
treble/luna
treble/luna10mo ago
#rules 5 too