Skip to content

'SlashCommand' object is not callable  #91

@rpop0

Description

@rpop0

Summary

This issue is about a warning that happens when trying to use slash commands using the @bot.slash_command() decorator.

Reproduction Steps

Trying to use any kind of slash command. This issue also happens with the code example from the readme of the github page.

Minimal Reproducible Code

@bot.slash_command()
async def hello(ctx, name: str = None):
    name = name or ctx.author.name
    await ctx.send(f"Hello {name}!")


### Expected Results

No warnings given for the slash command decorator.

### Actual Results

![image](https://user-images.githubusercontent.com/38384209/132031304-d14c5750-80af-4c13-a44a-31cc14da159f.png)


### Intents

intents = discord.Intents.all()

### System Information

- Python v3.9.1-final
- pycord v2.0.0-alpha
    - pycord pkg_resources: v2.0.0a3785+g16dcf2c6
- aiohttp v3.7.4.post0
- system info: Windows 10 10.0.19041


### Checklist

- [X] I have searched the open issues for duplicates.
- [X] I have shown the entire traceback, if possible.
- [X] I have removed my token from display, if visible.

### Additional Context

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions