[Core] Add --unload-cogs cli flag. (#5802)

* [Core] Add `--unload-cogs` cli.

* Fixed error + Reformat.

* At @Jack1142's request, the `packages` local variable is no longer a list, but a dictionary with `None` values, to avoid duplication.

* Update redbot/core/bot.py

Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>

* Update redbot/core/bot.py

Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>

* Update bot.py

* Update bot.py

Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
AAA3A
2022-07-19 17:10:45 +02:00
committed by GitHub
parent 7429b4ff89
commit 6ced7ba945
2 changed files with 17 additions and 11 deletions

View File

@@ -185,6 +185,9 @@ def parse_cli_flags(args):
help="Force loading specified cogs from the installed packages. "
"Can be used with the --no-cogs flag to load these cogs exclusively.",
)
parser.add_argument(
"--unload-cogs", type=str, nargs="+", help="Force unloading specified cogs."
)
parser.add_argument(
"--dry-run",
action="store_true",