AyushSehrawat/eco-bot

ERROR: discord.errors.ExtensionFailed: Extension 'games.economy.economy' raised an error: AttributeError: 'Bot' object has no attribute 'remove_command'

Blake-McCullough opened this issue · 7 comments

So i keep getting the error:

Traceback (most recent call last):
  File "c:\Users\blake\Main-Discord-Bot\main.py", line 41, in <module>
    client.load_extension(cog_file) # Load the file
  File "C:\Users\blake\AppData\Roaming\Python\Python310\site-packages\discord\cog.py", line 787, in load_extension
    self._load_from_module_spec(spec, name)
  File "C:\Users\blake\AppData\Roaming\Python\Python310\site-packages\discord\cog.py", line 732, in _load_from_module_spec
    raise errors.ExtensionFailed(key, e) from e
discord.errors.ExtensionFailed: Extension 'games.economy.economy' raised an error: AttributeError: 'Bot' object has no attribute 'remove_command'PS

(I have taken the cog out and converted to slash commands, however that shouldn't be causing this at all, as I have many other functions doing it)

It seems like the cog you added has errors. Check it for the syntax of remove_command

This code is kinda old so it doesn't support slash commands. You may need to build it from scratch and use this code as a reference

Send me more files, since i can't deduce anything except error in remove_command.

Thankyou for super quick response!

economy.py.txt
errors.py.txt
info.py.txt
shop.py.txt
Here are files (Made into txt files so I can upload).

And I have seen couple of old ones and been able to convert them to slash (I mean why re invent the wheel?)

Thanks!

Are you on discord ?

And I have seen couple of old ones and been able to convert them to slash (I mean why re invent the wheel?)
You may be doing some error i guess. Also, tbh my load and unload function of bot are pretty old, it would be better if you just change the way of loading extensions in this bot and then try ( Maybe try the way you did on others ).

Yep.

Spoiled_Kitten#4911

or/and

https://discord.gg/CeFm4esFKJ