mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-06 01:12:33 -05:00
Prevent / being used in bot or server prefixes (#5693)
* Update `[p]set prefix`/`[p]set serverprefix` * Update cli * style * update __main__ * style * improve checks * Raise in Red.set_prefixes, update responses * uniform responses * Fixes * Keep generator variable names consistent across files
This commit is contained in:
@@ -70,6 +70,11 @@ async def interactive_config(red, token_set, prefix_set, *, print_header=True):
|
||||
if len(prefix) > 10:
|
||||
if not confirm("Your prefix seems overly long. Are you sure that it's correct?"):
|
||||
prefix = ""
|
||||
if prefix.startswith("/"):
|
||||
print(
|
||||
"Prefixes cannot start with '/', as it conflicts with Discord's slash commands."
|
||||
)
|
||||
prefix = ""
|
||||
if prefix:
|
||||
await red._config.prefix.set([prefix])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user