Error 40003 - You are opening direct messages too fast
ignshifts opened this issue · comments
Shifts commented
Which package has the bugs?
The core library
Issue description
Sending direct messages to users from a server, how can I prevent this error or work around it? Do I just add a delay, I've never seen this error before
Code sample
member.createDM(true).then((dm) => {
dm.send(Message)
.then(() => {
console.log(
`${chalk.green(`[✓]`)} (${client.token}) - Sent message to: ${member.user.tag} with delay: ${randomDelay} seconds`,
);
successfulDMCount++;
})
.catch((err) => {
console.log(
`${chalk.red(`[✕]`)} (${client.token}) - Failed to send message to: ${member.user.tag} - Delay: ${randomDelay} seconds - Error code: ${err.code}`,
);
failedDMCount++;
console.log(err);
});
});
Package version
"discord.js-selfbot-v13": "^3.1.3",
Node.js version
v18.16.1
Operating system
Windows 11
Priority this issue should have
Low (slightly annoying)
Checklist
- I have searched the open issues for duplicates.
- I have shared the entire traceback.
- I am using a user token (and it isn't visible in the code).
Additional Information
No response
Shifts commented
Sans commented
await client.sleep(Number)
Shifts commented
That seemed to work thanks!