Skip to content

Conversation

@NeilShah2026
Copy link

When you use the command_run on the on_slash_command event, it does not work, as slash commands to not register their name in that format, the new function, slash_command_start will fix that.

When you use the `command_run` on the `on_slash_command` event, it does not work, as slash commands to not register their name in that format, the new function, `slash_command_start` will fix that.
@NeilShah2026
Copy link
Author

@anishanne

@niklasmoell
Copy link

niklasmoell commented Jan 1, 2022

Why do you create a new method instead of having a parameter in the command_run function?

My suggestion would be:

def command_run(self, ctx: Context, slash: bool=False) -> None:
    self.commands += 1
    if ctx.author.id not in self.active:
        self.active.append(ctx.author.id)
    command = ctx.command.name if not slash else ctx.name

And second, for which Library is this support? There is no official support from discord.py because it isn't maintained anymore and didn't get to this state in the alpha. It doesn't make sense to add support for an external library that only a few people use. This feature should be implemented when there is a good fork that is in a Release state, which is popular and is used by most Python Developers.

@NeilShah2026
Copy link
Author

NeilShah2026 commented Jan 1, 2022 via email

@anishanne
Copy link
Member

@NeilShah2026 With the resurgence of discord.py, we're more than happy to review this once it's fixed to work with the official Discord.py library.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants