-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: Add method for accessing command entities hydrated with matching custom prefixes #31
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #31 +/- ##
===========================================
+ Coverage 68.13% 85.86% +17.72%
===========================================
Files 7 8 +1
Lines 408 658 +250
Branches 66 102 +36
===========================================
+ Hits 278 565 +287
+ Misses 128 90 -38
- Partials 2 3 +1 ☔ View full report in Codecov by Sentry. |
Force-push was a rebase for solving conflitcs over JSdoc 0ffb2c1 + squashing |
- changes getNearestCommand to throw when calling it on an update with no text instead of returning null (matches behavior of setMyCommands and getCommandEntities)
minor additions:
|
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.
mainly nitpicks
Fix spellings Co-authored-by: Roz <[email protected]>
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.
LGTM.
closes #23
closes #32 (uses the first matched entity, does not allow for multiple misspelled commands, I personally don't think it's a good idea to support that)
Allow retrieval for command entities that do not have '/' as a prefix. (Check only for prefixes registered inside the given Commands instances)
Allows:
for the given example:
Relevant lines:
commands/src/context.ts
Lines 87 to 96 in 1110c6e
commands/src/context.ts
Lines 124 to 170 in 1110c6e
Note: addition of the Super-Expressive Library would make the regex much more easier to read, into: