#cod
import discord
from discord.ext import commands
client = discord.Client(intents = discord.Intents().all)
Traceback (most recent call last):File "E:\PyCharm\bot\Bot_state.py", line 4, in client = discord.Client(intents = discord.Intents().all)File "E:\PyCharm\bot\lib\site-packages\discord\client.py", line 248, in __init__self._connection = self._get_state(**options)File "E:\PyCharm\bot\lib\site-packages\discord\client.py", line 265, in _get_statereturn ConnectionState(dispatch=self.dispatch, handlers=self._handlers,File "E:\PyCharm\bot\lib\site-packages\discord\state.py", line 152, in __init__raise TypeError(‘intents parameter must be Intent not %r’ % type(intents))TypeError: intents parameter must be Intent not <class ‘method’>
>Solution :
You forgot to call all(). The error message therefore is saying that you are trying to pass the method all as argument instead of an Intent (what calling all() is supposed to return).
Here is the correct piece of code:
#cod
import discord
from discord.ext import commands
client = discord.Client(intents = discord.Intents().all())