Discord API "soft-ban" for Selfbot? It can only read its own messages

So today, all of a sudden, my Discord Selfbot stopped working. It has been running for weeks without any issue. All it does is monitoring the bot alerts from other channels and notify me if certain conditions are met.

Basically the problem is that when I print(message.content) I get empty string, and when I print(message.embeds) I get an empty list. This happens for any message that isn't sent by myself. Basically I can pull any message from any channel, but if it's not sent by me, I will see it empty. I can still print(message) and see its ID, author, etc., but can't retrieve the content/embeds.

I thought it was some sort of soft-ban from the Discord API (account didn't receive any warning and works normally), but then tryed to make a new account and got the same issue. I'm so confused and can't find out what's the cause of the problem... Unless they changed the API for everyone.


Solution 1:

I've been playing with this for the past few weeks, and using tips and ideas all over the internet, I created a patched version of Discord.py for self-bots.

It seems that you need to do couple of things to get message.content & message.embeds working again:

  • Disable all Intents
  • Edit the IDENTIFY packet sent to Discord

My fork does all that, as well as obfuscate the user-agent and a few other things.

Check the README for things changed + credits.

Link: GitHub, PyPi

Solution 2:

The answer to everyone's question:

On April 30th, 2021 discord made some change that broke receiving message content and embeds (and maybe more) on selfbots only. If you have this issue, then you're using a selfbot, which is against the discord TOS... it is also deprecated by discord.py since version 1.7 and won't receive support. You need to change to a real bot if you want support