- 
                Notifications
    You must be signed in to change notification settings 
- Fork 33
✨ Command groups #342
✨ Command groups #342
Conversation
Signed-off-by: Lunarmagpie <[email protected]>
Signed-off-by: Lunarmagpie <[email protected]>
| Codecov Report
 @@           Coverage Diff           @@
##             main     #342   +/-   ##
=======================================
  Coverage   90.54%   90.54%           
=======================================
  Files           8        8           
  Lines          74       74           
=======================================
  Hits           67       67           
  Misses          7        7           Continue to review full report at Codecov. 
 | 
Co-authored-by: Yohann Boniface <[email protected]>
Co-authored-by: Yohann Boniface <[email protected]>
| Just found a major optimization in the built_register 🚀🚀🚀🚀🚀 Note to @trag1c: this change made your 2 last requested changes useless 💀 | 
|  | ||
| # NOTE: Cannot be generator since it can't be consumed due to lines 743-745 | ||
| to_remove = list(filter(should_be_removed, self._api_commands)) | ||
| to_remove = [*filter(should_be_removed, self._api_commands)] | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is star operator faster/better than list?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is star operator faster/better than
list?
I found it about 1-2% faster so probably no difference. Looks better though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the list function is much more readable in this case
Co-authored-by: Yohann Boniface <[email protected]>
| Just a suggestion (you don't have to do this now). ex: class Bot:
    group = Group("cool_commands")
    @group.command
    async def a_very_cool_command():
        pass | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just found some docstring issues
| 
 This is extremely easy to do but I didn't do it because command has like a hundred params so there would a lot of code duplication. Its extremely easy to do though so I can do it if you guys think its fine. edit: why did i write its extremely easy to do twice xD. 💀 ty for merging btw 🙏 | 
Co-authored-by: Endercheif <[email protected]>
Co-authored-by: Endercheif <[email protected]>
Changes
adds: Command groups, they probably work.fixed:Maybe the first PR where I didn't have to fix anything 🚀lmao that was a lie. I had to switch the __ttl argument in HTTP to _ttl.
Also fixed doc building issues.
improvements: NoneI want to get a release out after this.
Check off the following