Skip to content

Automatically call get_cog_commands for all cogs #75

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

Merged
merged 9 commits into from
Jan 16, 2021

Conversation

Geekid812
Copy link
Contributor

Changes

  • I checked this pull request runs on Python 3.6.X.
  • This fixes something in Issues.
    • Issue:
  • This adds something new.
  • There is/are breaking change(s).
  • (If required) Document string is updated/added.
  • This changes anything except python code. (README, docs, etc.)

About this pull request

This removes the necessity to call get_cog_commands() on each cog by automatically doing so in register_all_commands(). It also displays a temporary warning that the call is no longer required. README and docs have been updated to reflect this.

Also, first PR hype?

@i0bs
Copy link
Contributor

i0bs commented Jan 15, 2021

LTGM!

@Geekid812
Copy link
Contributor Author

What's wrong?

@spinnerich
Copy link
Contributor

Looks good at first glance 👍

@eunwoo1104
Copy link
Contributor

There is one problem: it can't handle cog reload.

@eunwoo1104 eunwoo1104 self-requested a review January 16, 2021 08:32
@eunwoo1104 eunwoo1104 self-assigned this Jan 16, 2021
@Geekid812
Copy link
Contributor Author

Okay then, new approach: overriding bot.add_cog and bot.remove_cog to register slash commands. This now makes it fully reload compatible. (docs not updated yet)

Geekid812 and others added 3 commits January 16, 2021 11:46
Co-authored-by: eunwoo1104 <61371424+eunwoo1104@users.noreply.github.com>
Co-authored-by: eunwoo1104 <61371424+eunwoo1104@users.noreply.github.com>
@eunwoo1104
Copy link
Contributor

Merging this pull request, thank you for contributing!

@eunwoo1104 eunwoo1104 merged commit 92930e0 into interactions-py:master Jan 16, 2021
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.

4 participants