'tried to make a discord bot , but gave an error:

#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'>



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source