feat(bot): ✨ Make prefixes allow up to 5 characters.

This commit is contained in:
Nyeki.py
2024-10-17 02:10:18 -03:00
parent 130cadd6df
commit aaae63c420
3 changed files with 15 additions and 4 deletions
+3 -3
View File
@@ -271,16 +271,16 @@ class Payphone(commands.AutoShardedBot):
Args:
server (discord.Guild | models.Server | int): The server to update or it's ID.
prefix (str, optional): The new prefix. It cannot be longer than 3 characters. Defaults
prefix (str, optional): The new prefix. It cannot be longer than 5 characters. Defaults
to "p.".
Raises:
ValueError: The prefix provided is invalid.
"""
if len(prefix) > 3 or len(prefix) == 0:
if len(prefix) > 5 or len(prefix) == 0:
raise ValueError(
"The prefix must not be longer than 3 characters and must not be an empty string."
"The prefix must not be longer than 5 characters and must not be an empty string."
)
server_id = server if isinstance(server, int) else server.id