fix: display help for the correct command when an error occurs in timed#679
Merged
Conversation
ChrisLovering
approved these changes
Apr 12, 2021
Member
ChrisLovering
left a comment
There was a problem hiding this comment.
Looks good to me, tested locally.
Xithrius
reviewed
Apr 14, 2021
Contributor
Xithrius
left a comment
There was a problem hiding this comment.
Is there a way of having the bot send something like .timed uwu <text>?
Contributor
Author
|
I'll see what I can do, but I get the feeling the solution may end up being quite ugly, anyway, will see :P |
Xithrius
reviewed
Apr 14, 2021
386e178 to
fbe8e0a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When a new execution context is created in the timed command it's now added as the
subcontextattribute of the parent context. When the error handler deals with the error the context is set to the subcontext if available, else the normal context. This means the command displays correctly.Reasoning
It's been implemented this way since I believe it to be the cleanest and simplest way to do this. If this turns out not to be the case I'm more than happy to change the implementation to something more suitable.
Screenshots
Before:


After:
Did you:
pipenv lock?pipenv run lint)?