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
[Core] Add redbot --edit
cli flag (replacement for [p]set owner&token
)
#3060
Merged
Conversation
This file contains 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
redbot --edit
cli flagredbot --edit
cli flag (something to put in place of [p]set owner&token
)
After a bit of testing, a keyboard interrupt throws this error: |
This is now ready for review, I updated the PR description accordingly. |
redbot --edit
cli flag (something to put in place of [p]set owner&token
)redbot --edit
cli flag (replacement for [p]set owner&token
)
Flame442
requested changes
Nov 2, 2019
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.
Type
Description of the changes
This PR adds
redbot --edit
cli flag that allows to edit instance name, token, owner and datapath. It's supposed to be a replacement for[p]set owner
and[p]set token
that were removed due to being potentially dangerous.I used the occasion to unify all confirmation prompts in Red's cli commands and also fixed a small bug that allowed user to pass no arguments to
--co-owner
and--load-cogs
Flags that can be used with
redbot --edit
:--no-prompt
- disables everything interactive in the command, if it's not passed the command will ask for everything that wasn't passed with other flags--token
- can be used to change token--owner
- can be used to change owner--edit-instance-name
- can be used to change instance name--overwrite-existing-instance
- can be used with--edit-instance-name
to allow Red to overwrite existing instance when changing name--edit-data-path
- can be used to change data path--copy-data
- can be used with--edit-data-path
to make Red copy data from old data path to new oneThis might be considered breaking as I did change function signature for
confirm()
andinteractive_config()
that are underredbot.core.cli
module but I didn't make changelog entries for that and I'm waiting for response whether I should add changelog entries, make this change non-breaking in that regard or don't change anything at all.