Skip to content

Possible Error in Event Callback Name Generation for Subcommands #56

Closed
@EthanC

Description

My understanding is that Dispike generates callback names for commands, this process is not handled by Discord. Assuming this is in fact the case, this Issue describes what I feel to be unintuitive results from this process. When nesting a single level subcommand without the use of subcommand groups, the first argument name is included in the callback name.

The following example produces a callback name of lorem.ipsum.dolor.

However, the command usage is /lorem ipsum dolor:VALUE sit:VALUE amet:VALUE. Shouldn't the callback name be lorem.ipsum?

DiscordCommand(
    name="lorem",
    description="...",
    options=[
        CommandOption(
            name="ipsum",
            description="...",
            type=CommandTypes.SUB_COMMAND,
            options=[
                CommandOption(
                    name="dolor",
                    description="..."
                    type=CommandTypes.STRING,
                    required=True,
                    choices=[...]
                ),
                CommandOption(
                    name="sit",
                    description="..."
                    type=CommandTypes.STRING,
                    required=True,
                    choices=[...]
                )
                CommandOption(
                    name="amet",
                    description="..."
                    type=CommandTypes.STRING,
                    required=True,
                    choices=[...]
                )
            ]
        )    
    ]
)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Fixed in the Next ReleaseThis issue will be resolved in the next release.bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions