After attempting to complete the Discord But Tutorial a few times recently on Replit, it appears that the Tutorial is outdated at this point.
After following all the steps in Feb-2023, I receive the following error in the console:
Traceback (most recent call last): File "main.py", line 4, in <module> client = discord.Client() TypeError: Client.__init__() missing 1 required keyword-only argument: 'intents'
Ghostwriter debugger told me to update the line:
client = discord.Client()
client = discord.Client(intents=discord.Intents.all())
But then, once I try to run the application again, I receive a new error message that is more detailed about the issue at hand:
File "/home/runner/SandlerBot/venv/lib/python3.10/site-packages/discord/client.py", line 672, in connect raise PrivilegedIntentsRequired(exc.shard_id) from None discord.errors.PrivilegedIntentsRequired: Shard ID None is requesting privileged intents that have not been explicitly enabled in the developer portal. It is recommended to go to https://discord.com/developers/applications/ and explicitly enable the privileged intents within your application's page. If this is not possible, then consider disabling the privileged intents instead
The documentation doesn’t list any follow up steps here, but I managed to stumble upon this Stackoverflow post that talks about the simple steps you need to take to make it work. So that others don’t have to get frustrated with the documentation as is, can someone update the actual documentation to account for the change in how Discord Bots work?