Bot Direct Message Rate Limits/Quarantine

Hello, A few years ago I was working on a bot, and eventually decided I wanted to give all of its users a brief update about the bot so I tried sending each of them a DM at the same time. This resulted in my bot getting indefinitely quarantined. Now, I'm trying to use Discord as a notification system for a WebApp I've built, and I'm wondering if there is any way to determine what that quarantine/rate limit might look like? I can't seem to find any information online, but I really don't want my bot to get quarantined again. How do some of the bigger/well established bots that DM you not get quarantined? Like the ones that DM you every time you join a server or whatnot?
8 Replies
d.js toolkit
d.js toolkit15mo 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!
Tyranasaurus
TyranasaurusOP15mo ago
Apologies that this isn't directly a dev question, but I figured the people here would know
d.js docs
d.js docs15mo ago
DiscordAPIError: Cannot send messages to this user Your bot is trying to send a DM to a user, but failed to do so: - The user has DMs disabled or the bot blocked - The user no longer shares a guild with the bot (make sure to send informational DMs before banning/kicking) - The bot is trying to DM itself or another bot Note: You cannot check if you can send a DM beforehand but have to handle the rejection case
treble/luna
treble/luna15mo ago
oop wrong one
d.js docs
d.js docs15mo ago
Mass DMing users is not allowed as per developer ToS, considered spam and can get you and your bot banned. - Mention @everyone to inform all your users at once instead - Discord Developer Terms of Service: learn more | FAQ summary
Tyranasaurus
TyranasaurusOP15mo ago
So as long as I'm not mass-DMing users I should be okay? E.g. a user gets DMed every time someone leaves a comment on their profile in my WebApp
treble/luna
treble/luna15mo ago
other ratelimits are dynamic and ideally a user should only be dm'd if they ran a command or interaction
Tyranasaurus
TyranasaurusOP15mo ago
Not quite in my case, but they have voluntarily authorized my WebApp through Discord? That's how my webapp knows their discord id to be able to DM them
Want results from more Discord servers?
Add your server