From 0a705071c2f45fc8e1ccf4c40ac0d249cd086123 Mon Sep 17 00:00:00 2001 From: Kowlin Date: Sun, 31 Dec 2017 04:19:56 +0100 Subject: [PATCH] [Core] QoL for argparser (#1217) * Made Argparser more QoL * Edited the usage command. --- redbot/core/cli.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/redbot/core/cli.py b/redbot/core/cli.py index 87c58cb92..80f3d7928 100644 --- a/redbot/core/cli.py +++ b/redbot/core/cli.py @@ -62,15 +62,16 @@ def ask_sentry(red: Red): def parse_cli_flags(args): - parser = argparse.ArgumentParser(description="Red - Discord Bot") + parser = argparse.ArgumentParser(description="Red - Discord Bot", + usage="redbot [arguments]") parser.add_argument("--list-instances", action="store_true", help="List all instance names setup " "with 'redbot-setup'") parser.add_argument("--owner", type=int, help="ID of the owner. Only who hosts " "Red should be owner, this has " - "serious security implications.") - parser.add_argument("--co-owner", type=int, action="append", default=[], + "serious security implications if misused.") + parser.add_argument("--co-owner", type=int, default=[], nargs="*", help="ID of a co-owner. Only people who have access " "to the system that is hosting Red should be " "co-owners, as this gives them complete access " @@ -79,8 +80,7 @@ def parse_cli_flags(args): "multiple.") parser.add_argument("--prefix", "-p", action="append", help="Global prefix. Can be multiple") - parser.add_argument("--no-prompt", - action="store_true", + parser.add_argument("--no-prompt", action="store_true", help="Disables console inputs. Features requiring " "console interaction could be disabled as a " "result")