-
Notifications
You must be signed in to change notification settings - Fork 36
✨ ⚡ Added Mentionable type and improved Interaction performance #253
Conversation
Codecov Report
@@ Coverage Diff @@
## main #253 +/- ##
=======================================
Coverage 90.00% 90.00%
=======================================
Files 9 9
Lines 100 100
=======================================
Hits 90 90
Misses 10 10 Continue to review full report at Codecov.
|
Parts of the diff look wrong. Will reopen once I fix that. |
Looks pretty good now. Im not sure about my if/else tower but I don't know what to replace it with, dict wouldn't work great here. |
19d77c4
to
c4e6304
Compare
Co-authored-by: Endercheif <[email protected]>
from the discord API. | ||
for option in self.data.options: | ||
|
||
if option.type is AppCommandOptionType.STRING: |
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.
does this big elif
chain is actually any faster?
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.
No idea. It's there now since Mentionable runs two different functions so a dictionary doesn't work.
The optimazatiom comes from me removing unnecessary request to the discord API.
Changes
adds
: Mentionable type is now a thing, Merges User and GuildMember to make some stuff easier.improvements
: Interactions no longer make excess calls to the discord APICheck off the following