mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
Ask for confirmation before setting prefix on first-time setup (#6287)
Co-authored-by: Michael Oliveira <34169552+Flame442@users.noreply.github.com>
This commit is contained in:
parent
185b607544
commit
9345b691b3
@ -80,7 +80,7 @@ async def interactive_config(red, token_set, prefix_set, *, print_header=True):
|
|||||||
print(
|
print(
|
||||||
"\nPick a prefix. A prefix is what you type before a "
|
"\nPick a prefix. A prefix is what you type before a "
|
||||||
"command. Example:\n"
|
"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 "
|
"The prefix can be multiple characters. You will be able to change it "
|
||||||
"later and add more of them.\nChoose your prefix:\n"
|
"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."
|
"Prefixes cannot start with '/', as it conflicts with Discord's slash commands."
|
||||||
)
|
)
|
||||||
prefix = ""
|
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:
|
if prefix:
|
||||||
await red._config.prefix.set([prefix])
|
await red._config.prefix.set([prefix])
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user