[Core] Changed prefix length to 40. (#5476)

* Update core_commands.py

* Docs yes facebook's metaverse

*jokes on me*

* meta

* forgot here

* Update core_commands.py

* Forgot here

* And forgot here
This commit is contained in:
MAX 2021-12-25 04:14:16 +01:00 committed by GitHub
parent e878483318
commit b091f13df5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -3651,7 +3651,7 @@ Sets Red's server prefix(es).
This is not additive. It will replace all current server prefixes. This is not additive. It will replace all current server prefixes.
You cannot have a prefix with more than 20 characters. You cannot have a prefix with more than 25 characters.
**Examples:** **Examples:**
- ``[p]set serverprefix !`` - ``[p]set serverprefix !``

View File

@ -102,7 +102,7 @@ _ = i18n.Translator("Core", __file__)
TokenConverter = commands.get_dict_converter(delims=[" ", ",", ";"]) TokenConverter = commands.get_dict_converter(delims=[" ", ",", ";"])
MAX_PREFIX_LENGTH = 20 MAX_PREFIX_LENGTH = 25
class CoreLogic: class CoreLogic:
@ -3559,7 +3559,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic):
if any(len(x) > MAX_PREFIX_LENGTH for x in prefixes): if any(len(x) > MAX_PREFIX_LENGTH for x in prefixes):
await ctx.send( await ctx.send(
_( _(
"Warning: A prefix is above the recommended length (20 characters).\n" "Warning: A prefix is above the recommended length (25 characters).\n"
"Do you want to continue?" "Do you want to continue?"
) )
+ " (yes/no)" + " (yes/no)"
@ -3589,7 +3589,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic):
Warning: This will override global prefixes, the bot will not respond to any global prefixes in this server. Warning: This will override global prefixes, the bot will not respond to any global prefixes in this server.
This is not additive. It will replace all current server prefixes. This is not additive. It will replace all current server prefixes.
A prefix cannot have more than 20 characters. A prefix cannot have more than 25 characters.
**Examples:** **Examples:**
- `[p]set serverprefix !` - `[p]set serverprefix !`
@ -3605,7 +3605,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic):
await ctx.send(_("Server prefixes have been reset.")) await ctx.send(_("Server prefixes have been reset."))
return return
if any(len(x) > MAX_PREFIX_LENGTH for x in prefixes): if any(len(x) > MAX_PREFIX_LENGTH for x in prefixes):
await ctx.send(_("You cannot have a prefix longer than 20 characters.")) await ctx.send(_("You cannot have a prefix longer than 25 characters."))
return return
prefixes = sorted(prefixes, reverse=True) prefixes = sorted(prefixes, reverse=True)
await ctx.bot.set_prefixes(guild=ctx.guild, prefixes=prefixes) await ctx.bot.set_prefixes(guild=ctx.guild, prefixes=prefixes)