Raise error when User doesn't accept DM
See original GitHub issueSummary
Raise an error if the user we try to send a message to doesn’t accepts direct messages
What is the feature request for?
The core library
The Problem
Currently, there is no way to know if a user will receive a message when we send one. And moreover, sending a message to someone not accepting it, blocks the execution flow and stops the function
The Ideal Solution
The user.send
and member.send
functions should raise an Error such as the Forbidden
error. So that we know if the execution failed. We would only need to catch this error and then adapt our code.
The Current Solution
Currently there is none since it seems sending this kind of DM completely blocks the execution flow
Additional Context
No response
Issue Analytics
- State:
- Created a year ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Error message "User doesn't accept direct messages ... - Reddit
A user just told me they are getting the error message "User doesn't accept direct messages. Try sending a chat request instead.
Read more >discord bot failing to send direct message, upon kicking ...
While testing: The kicked users DMs were open; the bot had admin privileges. The console gives out this error: discord.ext.commands.
Read more >Instagram won't let me send a message to one person. It says ...
If I have a DM conversation on Instagram and the other person unfollows me, but doesn't block me, will they still be able...
Read more >It looks like the account-limits of "POST direct_messages ...
The issue I want to report is: I received a message from a user, but the message doesn't reset 24 hour window and...
Read more >Error Handling in Discord.py | Part 5 - YouTube
In this video, we will learn how to handle errors in our bot coded in python using discord.py v1.0.1 (rewrite) in 2020.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I found where it was changed : 0546343bcb138b71ca1f16a5ae10893efeac651c I apologize for creating this issue
hmm, looks like updating fixed it, but I don’t see any commit that could have changed this behaviour…