mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
[Core] QoL for argparser (#1217)
* Made Argparser more QoL * Edited the usage command.
This commit is contained in:
parent
80d68684fb
commit
0a705071c2
@ -62,15 +62,16 @@ def ask_sentry(red: Red):
|
|||||||
|
|
||||||
|
|
||||||
def parse_cli_flags(args):
|
def parse_cli_flags(args):
|
||||||
parser = argparse.ArgumentParser(description="Red - Discord Bot")
|
parser = argparse.ArgumentParser(description="Red - Discord Bot",
|
||||||
|
usage="redbot <instance_name> [arguments]")
|
||||||
parser.add_argument("--list-instances", action="store_true",
|
parser.add_argument("--list-instances", action="store_true",
|
||||||
help="List all instance names setup "
|
help="List all instance names setup "
|
||||||
"with 'redbot-setup'")
|
"with 'redbot-setup'")
|
||||||
parser.add_argument("--owner", type=int,
|
parser.add_argument("--owner", type=int,
|
||||||
help="ID of the owner. Only who hosts "
|
help="ID of the owner. Only who hosts "
|
||||||
"Red should be owner, this has "
|
"Red should be owner, this has "
|
||||||
"serious security implications.")
|
"serious security implications if misused.")
|
||||||
parser.add_argument("--co-owner", type=int, action="append", default=[],
|
parser.add_argument("--co-owner", type=int, default=[], nargs="*",
|
||||||
help="ID of a co-owner. Only people who have access "
|
help="ID of a co-owner. Only people who have access "
|
||||||
"to the system that is hosting Red should be "
|
"to the system that is hosting Red should be "
|
||||||
"co-owners, as this gives them complete access "
|
"co-owners, as this gives them complete access "
|
||||||
@ -79,8 +80,7 @@ def parse_cli_flags(args):
|
|||||||
"multiple.")
|
"multiple.")
|
||||||
parser.add_argument("--prefix", "-p", action="append",
|
parser.add_argument("--prefix", "-p", action="append",
|
||||||
help="Global prefix. Can be multiple")
|
help="Global prefix. Can be multiple")
|
||||||
parser.add_argument("--no-prompt",
|
parser.add_argument("--no-prompt", action="store_true",
|
||||||
action="store_true",
|
|
||||||
help="Disables console inputs. Features requiring "
|
help="Disables console inputs. Features requiring "
|
||||||
"console interaction could be disabled as a "
|
"console interaction could be disabled as a "
|
||||||
"result")
|
"result")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user