Well, that's what it is. After upgrading Discord's python3 discord.py to 1.5.1, I couldn't get the member list.
The explanation was written in discordpy.readthedocs.io.
In summary, when upgrading Discord, you have to update the data before you get a list of members! It seems that.
As it was written in the official commentary earlier,
Although it is written here, go to the Discord website and set up Privileged Gateway Intents.
Updated basic settings at the beginning, though it is written here
First set like this.
import discord
intents = discord.Intents.default()
intents.members = True
Next time when you take discord.Client
discord.Client(intents=intents)
So, pass intents as an argument.
Finally, when getting the member information, execute the chunk function to browse the information.
await members.chunk(cache=True)
#After that, write the process to get the member information.
From time to time, I thought the reference was something to read. Oware.
Recommended Posts