Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[commands] Add guild(s) kwarg to BotBase.add_command and correct BotBase.add_cog doc #9428

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Soheab
Copy link
Contributor

@Soheab Soheab commented May 25, 2023

Summary

Fixes #9366

This PR adds the following kwargs to Bot.add_command: guild and guilds for hybrid app commands. This allows defining guilds for a hybrid app command while adding it to the bot, these are also used by the lib in BotBase.add_cog if any guild(s) were passed to that.

This PR also corrects the doc of the guild(s) kwargs in BotBase.add_cog which previously led users to believe that the kwargs are only valid for GroupCog/app_commands.Group which is not the case.

This can be a breaking change since previously hybrid app commands in cogs were not added as guild commands when the guild kwargs in add_cog were used. This could lead to unexpected behaviour.

I have not tested all possibilities/edge cases(if any) with the new kwargs for add_command.

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

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.

Add hybrid command support to Bot.add_cog guild kwargs
1 participant