Raptor123471 / DingoLingo

A Discord music bot written in Python with support for Youtube, SoundCloud, Spotify, Bandcamp, Twitter, and custom files.
GNU General Public License v3.0
278 stars 162 forks source link

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

Open Jackkluz opened 2 years ago

Jackkluz commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

Thanks, that works!!!