[V3] --token and --no-instance flags (#1872)

* Ability to run Red with token without instance

* --no-instance flag

* Reformatted cli with black

* Fix changes requested by @Tobotimus

- Use "system reboot" to be clearer
- save_default_config renamed to create_temp_config
- More documentation for the create_temp_config function

* Update create_temp_config call

* Fix up imports
This commit is contained in:
El Laggron
2018-06-25 11:25:23 +02:00
committed by Toby Harradine
parent c1bcca4432
commit ad27607ccc
3 changed files with 45 additions and 2 deletions

View File

@@ -138,6 +138,16 @@ def parse_cli_flags(args):
action="store_true",
help="Enables the built-in RPC server. Please read the docs prior to enabling this!",
)
parser.add_argument("--token", type=str, help="Run Red with the given token.")
parser.add_argument(
"--no-instance",
action="store_true",
help=(
"Run Red without any existing instance. "
"The data will be saved under a temporary folder "
"and deleted on next system restart."
),
)
parser.add_argument(
"instance_name", nargs="?", help="Name of the bot instance created during `redbot-setup`."
)