From 9345b691b3258ef7d2aec88a43e23c01529cdb9b Mon Sep 17 00:00:00 2001 From: Jakub Kuczys Date: Tue, 27 Feb 2024 00:15:07 +0100 Subject: [PATCH] Ask for confirmation before setting prefix on first-time setup (#6287) Co-authored-by: Michael Oliveira <34169552+Flame442@users.noreply.github.com> --- redbot/core/_cli.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/redbot/core/_cli.py b/redbot/core/_cli.py index bc263713f73..b8dbc65e492 100644 --- a/redbot/core/_cli.py +++ b/redbot/core/_cli.py @@ -80,7 +80,7 @@ async def interactive_config(red, token_set, prefix_set, *, print_header=True): print( "\nPick a prefix. A prefix is what you type before a " "command. Example:\n" - "!help\n^ The exclamation mark is the prefix in this case.\n" + "!help\n^ The exclamation mark (!) is the prefix in this case.\n" "The prefix can be multiple characters. You will be able to change it " "later and add more of them.\nChoose your prefix:\n" ) @@ -94,6 +94,12 @@ async def interactive_config(red, token_set, prefix_set, *, print_header=True): "Prefixes cannot start with '/', as it conflicts with Discord's slash commands." ) prefix = "" + if prefix and not confirm( + f'You chose "{prefix}" as your prefix. To run the help command,' + f" you will have to send:\n{prefix}help\n\n" + "Do you want to continue with this prefix?" + ): + prefix = "" if prefix: await red._config.prefix.set([prefix])