Jaede
Jaede
DIAdiscord.js - Imagine an app
Created by Jaede on 9/21/2023 in #djs-questions
user.send both resolving and rejecting
Discord.js v14.13.0 I have the following code (the user is fetched by Client.users.fetch(discordUserId).then()): user.send("reply goes here").then((message) => { console.log(message); }).catch((err) => { console.log(err.message); }).finally(() => { // stuff }); When the code fires, the message is sent as a DM to the user (correct), but I also get a rejection with a "Cannot send message to this user" error. I'm not sure why it's both resolving and rejecting, but that doesn't seem right so I assume I'm missing something. Thoughts? Edit: The error is a DiscordAPIError, code 50007.
14 replies