Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Jackkluz opened this issue Jul 15, 2022 · 2 comments
Open

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

Jackkluz opened this issue Jul 15, 2022 · 2 comments

Comments

@Jackkluz
Copy link

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>

@solaluset
Copy link

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.

@KatrielCNB
Copy link

Thanks, that works!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants