DingoLingo icon indicating copy to clipboard operation
DingoLingo copied to clipboard

TypeError: Client.start() got an unexpected keyword argument 'bot'

Open Jackkluz opened this issue 2 years ago • 2 comments

Just made a clone of this repository. Only addition I've made was a dotenv for my keys. I was trying to build my own bot and stumbled onto this. Where is the instantiation of bot as: bot = discord.Client() doesn't bot.run need an instantiation of the discord.client?

Here is the error I am getting on run.py:

Traceback (most recent call last): File "C:\Users\klucz\Desktop\Python\DMB\run.py", line 85, in bot.run(config.BOT_TOKEN, bot=True, reconnect=True) File "C:\Users\klucz\Desktop\Python\DMB\lib\site-packages\discord\client.py", line 715, in run return future.result() File "C:\Users\klucz\Desktop\Python\DMB\lib\site-packages\discord\client.py", line 694, in runner await self.start(*args, **kwargs) TypeError: Client.start() got an unexpected keyword argument 'bot' Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x000001ED3287C160>

Jackkluz avatar Jul 15 '22 14:07 Jackkluz

This problem occurred because this code is not compatible with pycord 2.0 and the version in requirements.txt isn't locked. Either install older version of pycord (pip install "py-cord<2.0.0") or try using my fork.

solaluset avatar Jul 15 '22 17:07 solaluset

Thanks, that works!!!

KatrielCNB avatar Jul 17 '22 08:07 KatrielCNB