feat: add command and option name in Exception message
@@ -802,7 +802,7 @@ class Client:
if not re.fullmatch(reg, _option.name):
raise LibraryException(
11,
- message=f"The option name does not match the regex for valid names ('{regex}')",
+ message=f"The option name ('{_option.name}') does not match the regex for valid names ('{regex}').",
)
if _option.description is MISSING or not _option.description:
raise LibraryException(
@@ -864,7 +864,7 @@ class Client:
and command.type == ApplicationCommandType.CHAT_INPUT
):
raise LibraryException(
- 11, message=f"Your command does not match the regex for valid names ('{regex}')"
+ 11, message=f"Your command name ('{command.name}') does not match the regex for valid names ('{regex}')."
)
elif command.type == ApplicationCommandType.CHAT_INPUT and (
command.description is MISSING or not command.description
