-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
400 Bad Request (error code: 50006): Cannot send an empty message #8344
Comments
Sorry. This issue is not actionable as-is. The HTTPException comes from the request to Discord failing and in this case would most likely denote an issue with your code. For example, things being |
@Rapptz But for example, the embed above, when the exception comes, prints (there are two prints on the catched exception): First prints:
And then, the next
Meaning that Also, I was debugging printing Any suggestion on how to debug it beside this? What information can I provide? Thanks! |
You're swallowing the exception on two different endpoints which send the same error, you forgot to check whether |
I checked I will check again with this code on the exception (when it comes again, as it is totally random):
I didn't understood when you said:
Am I not understanding something, or missing something? Sorry for that. Thanks! |
Both There's also probably a chance that your variables are being modified between the sleep call and they're globals or something. Either way, I can't really offer much help since this seems to be an application error. |
Sorry to keep bothering you...
The function is not using global variables.
Ohhh, well. I thought that only So... I hit the error again.I can see that To test it, I changed the
Printing:ERROR: Variables: This badge is owned by 205868 members. VARIABLES ABOVE! Traceback: |
Your bot is probably missing |
It was that! Thanks for all the help! To both of you. |
Summary
Sometimes, when I send messages to channels the bot gets that error, even if the message is not empty.
Reproduction Steps
Create an embed, and send it. This happens sometimes.
(THE REPRODUCIBLE CODE, DOESN'T REPRODUCE THE ERROR ALWAYS)
Minimal Reproducible Code
Expected Results
The message to be sent successfully.
Actual Results
Error happens, and message not sent.
Intents
discord.Intents.default() (and) intents.presences = True (and) intents.members = True (and) intents.message_content = False
System Information
python3.9 -m discord -v
Checklist
Additional Context
The bot uses that function (send) many times (at least 1 per minute), but this problem happens only sometimes. I can't reproduce the problem always. It happens every 30-60mins.
The configChannel is a TextChannel, and the member is a Member.
The text was updated successfully, but these errors were encountered: