-
Notifications
You must be signed in to change notification settings - Fork 36
✨ Rewrote command registration and added cogs #389
Conversation
Co-authored-by: Yohann Boniface <edhyjox@gmail.com>
Co-authored-by: Yohann Boniface <edhyjox@gmail.com>
Codecov Report
@@ Coverage Diff @@
## main #389 +/- ##
=======================================
Coverage 91.17% 91.17%
=======================================
Files 9 9
Lines 102 102
=======================================
Hits 93 93
Misses 9 9 Continue to review full report at Codecov.
|
Time to be reviewed again 💀 |
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 i've said everything i coulda think of before it was close and reopen
Co-authored-by: Endercheif <45527309+Endercheif@users.noreply.github.com>
Co-authored-by: Endercheif <45527309+Endercheif@users.noreply.github.com>
return list( | ||
map( | ||
AppCommand.from_dict, | ||
await self.client.http.get(self.__prefix + self.__get) | ||
+ [cmd for guild in guild_commands for cmd in guild], | ||
) | ||
) |
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.
return list( | |
map( | |
AppCommand.from_dict, | |
await self.client.http.get(self.__prefix + self.__get) | |
+ [cmd for guild in guild_commands for cmd in guild], | |
) | |
) | |
return [*map( | |
AppCommand.from_dict, | |
await self.client.http.get(self.__prefix + self.__get) | |
+ [cmd for guild in guild_commands for cmd in guild], | |
)] |
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.
list is better
pincer/client.py
Outdated
event = InteractableStructure( | ||
call=coroutine | ||
) |
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.
event = InteractableStructure( | |
call=coroutine | |
) | |
event = InteractableStructure(call=coroutine) |
Co-authored-by: trag1c <77130613+trag1c@users.noreply.github.com>
Co-authored-by: trag1c <77130613+trag1c@users.noreply.github.com>
Co-authored-by: trag1c <77130613+trag1c@users.noreply.github.com>
Co-authored-by: trag1c <77130613+trag1c@users.noreply.github.com>
Changes
adds
: Cogs. Look at the cog example to see how it works. Also kills old cog system.fixed
: Commands and Message Components are registered when a class is initiated. This makes pincer a lot more modular and any class can register a cog now. as long as it inherits fromInteractable
FUNCTIONAL BOTS WILL BE IMPOSSIBLE IF THIS GETS MERGED.Rewrote and they're possible + betterimprovements
: ...Check off the following