Message not being sent to a user's DMs

client.users.send(user,
{
embeds: [embed]
});
client.users.send(user,
{
embeds: [embed]
});
46 Replies
d.js toolkit
d.js toolkit2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
SuperPEKKA336
SuperPEKKA336OP2y ago
ye Client isnt defined
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
SuperPEKKA336
SuperPEKKA336OP2y ago
well why isnt Client being passed i defiend it in index
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
SuperPEKKA336
SuperPEKKA336OP2y ago
well idk
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
SuperPEKKA336
SuperPEKKA336OP2y ago
SuperPEKKA336
SuperPEKKA336OP2y ago
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
SuperPEKKA336
SuperPEKKA336OP2y ago
ah so interaction.client.userssend
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
SuperPEKKA336
SuperPEKKA336OP2y ago
yeah thanks
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
SuperPEKKA336
SuperPEKKA336OP2y ago
well remember when i asked about getting the user id?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
SuperPEKKA336
SuperPEKKA336OP2y ago
its returning MY userID
SuperPEKKA336
SuperPEKKA336OP2y ago
and sending a msg to me
SuperPEKKA336
SuperPEKKA336OP2y ago
not my alt
SuperPEKKA336
SuperPEKKA336OP2y ago
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
SuperPEKKA336
SuperPEKKA336OP2y ago
lemme try that
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
SuperPEKKA336
SuperPEKKA336OP2y ago
yeah thats what i thought getUser gets teh username tho, right?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
d.js docs
d.js docs2y ago
property User#username The username of the user
Danial
Danial2y ago
It returns the user, and you can do user.username then
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
SuperPEKKA336
SuperPEKKA336OP2y ago
the ID im tryign to get teh user's ID
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Danial
Danial2y ago
.send() takes UserResolvable though, so user should also work
SuperPEKKA336
SuperPEKKA336OP2y ago
ah ok
Danial
Danial2y ago
You could also just do User#send() as you have the user
d.js docs
d.js docs2y ago
method User#send() Sends a message to this user.
SuperPEKKA336
SuperPEKKA336OP2y ago
ah
SuperPEKKA336
SuperPEKKA336OP2y ago
perfect
SuperPEKKA336
SuperPEKKA336OP2y ago
thanks
Danial
Danial2y ago
Of course
SuperPEKKA336
SuperPEKKA336OP2y ago
:D and in my audit logs (CarlBot) i see the discriminator for users w the new username system uses Username#0
Danial
Danial2y ago
Yes, same goes for #member-log
SuperPEKKA336
SuperPEKKA336OP2y ago
oh didnt see that and bots will st with the discrim, correct?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
SuperPEKKA336
SuperPEKKA336OP2y ago
*stay ah ok
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
SuperPEKKA336
SuperPEKKA336OP2y ago
ok
Want results from more Discord servers?
Add your server