Skip to content

Commit

Permalink
Update core.py
Browse files Browse the repository at this point in the history
  • Loading branch information
amachn authored May 20, 2022
1 parent ee56fc2 commit 44791bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions discord/commands/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1650,8 +1650,8 @@ def validate_chat_input_name(name: Any, locale: Optional[str] = None):
elif not re.match(r"^[-_\w\d\u0901-\u097D\u0E00-\u0E7F]{1,32}$", name):
error = ValidationError(
r"Command names and options must follow the regex \"^[-_\w\d\u0901-\u097D\u0E00-\u0E7F]{1,32}$\". "
r"For more information, see {docs}/interactions/application-commands#application-command-object-"
rf'application-command-naming. Received "{name}"'
f"For more information, see {docs}/interactions/application-commands#application-command-object-"
f'application-command-naming. Received "{name}"'
)
elif name.lower() != name: # Can't use islower() as it fails if none of the chars can be lowered. See #512.
error = ValidationError(f'Command names and options must be lowercase. Received "{name}"')
Expand Down

0 comments on commit 44791bd

Please sign in to comment.