Skip to content
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
merged 7 commits into from Nov 8, 2019

Conversation

jack1142
Copy link
Member

@jack1142 jack1142 commented Oct 15, 2019

Type

  • Bugfix
  • Enhancement
  • New feature

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 one

This might be considered breaking as I did change function signature for confirm() and interactive_config() that are under redbot.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.

@jack1142 jack1142 changed the title [Core] Add redbot --edit cli flag [Core] Add redbot --edit cli flag (something to put in place of [p]set owner&token) Oct 15, 2019
@mikeshardmind mikeshardmind added this to the 3.2.0 milestone Oct 17, 2019
@Flame442 Flame442 added the Type: Feature label Oct 19, 2019
@Malarne
Copy link

@Malarne Malarne commented Oct 19, 2019

After a bit of testing, a keyboard interrupt throws this error:
https://media.discordapp.net/attachments/133251234164375552/635226798006861834/unknown.png

@jack1142 jack1142 marked this pull request as ready for review Oct 20, 2019
@jack1142
Copy link
Member Author

@jack1142 jack1142 commented Oct 20, 2019

This is now ready for review, I updated the PR description accordingly.

@jack1142 jack1142 changed the title [Core] Add redbot --edit cli flag (something to put in place of [p]set owner&token) [Core] Add redbot --edit cli flag (replacement for [p]set owner&token) Oct 20, 2019
changelog.d/3060.feature.rst Outdated Show resolved Hide resolved
redbot/__main__.py Show resolved Hide resolved
redbot/__main__.py Outdated Show resolved Hide resolved
redbot/__main__.py Show resolved Hide resolved
redbot/__main__.py Show resolved Hide resolved
Cog-CreatorsBot
Cog-CreatorsBot previously requested changes Nov 2, 2019
Copy link
Collaborator

@Cog-CreatorsBot Cog-CreatorsBot left a comment

Changes requested by Flame#2941

@Kowlin Kowlin self-assigned this Nov 8, 2019
Kowlin
Kowlin approved these changes Nov 8, 2019
Copy link
Member

@Kowlin Kowlin left a comment

Works fine, can't break it.

@mikeshardmind mikeshardmind merged commit 1651de1 into Cog-Creators:V3/develop Nov 8, 2019
1 check passed
@jack1142 jack1142 deleted the V3/issue_3060 branch Nov 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants