Reputation: 101
That is all of the imports I have, it works on my pc however when I tried to run it on my pi4 I got the error saying no attribute slash_command, I installed all the packages I thought I needed which was, py-cord, discord.py. Any help would be appreciated.
Upvotes: 1
Views: 9278
Reputation: 101
I figured it out I had to install py-cord
through this command:
pip install -U git+https://github.com/Pycord-Development/pycord
Upvotes: 4
Reputation: 175
It isn't commands.Bot
, it's discord.Bot
Try this:
bot = discord.Bot(intents=intents)
bot.slash_command(description="Test")
async def test(ctx):
ctx.respond("This is a test!")
commands.Bot
doesn't support slash commands.
Upvotes: 0