diff --git a/discord/app_commands/commands.py b/discord/app_commands/commands.py index 0508fb4a1..fd8770de9 100644 --- a/discord/app_commands/commands.py +++ b/discord/app_commands/commands.py @@ -142,7 +142,12 @@ def validate_name(name: str) -> str: match = VALID_SLASH_COMMAND_NAME.match(name) if match is None: raise ValueError('names must be between 1-32 characters') - if not name.islower(): + + # Ideally, name.islower() would work instead but since certain characters + # are Lo (e.g. CJK) those don't pass the test. I'd use `casefold` instead as + # well, but chances are the server-side check is probably something similar to + # this code anyway. + if name.lower() != name: raise ValueError('names must be all lower case') return name