In the new version of discord.py(1.5.x), there’re some updates about Intents
. Intents are similar to permissions, you have to define Intents to get channels, members and some events etc. You have to define it before defining the client = discord.Bot(prefix='')
.
import discord
intents = discord.Intents().all()
client = discord.Bot(prefix='', intents=intents)
Also, you have to activate Intents from your bot application in Discord Developer Portal.
If you want to get more information about Intents, you can look at the API References.
CLICK HERE to find out more related problems solutions.