diff --git a/discord/app_commands/namespace.py b/discord/app_commands/namespace.py index bd6b0f833..d7b6eb8c2 100644 --- a/discord/app_commands/namespace.py +++ b/discord/app_commands/namespace.py @@ -142,7 +142,8 @@ class Namespace: self.__dict__[name] = value elif opt_type == 10: # number value = option['value'] # type: ignore # Key is there - if value is None: + # This condition is written this way because 0 can be a valid float + if value is None or value == '': self.__dict__[name] = float('nan') else: self.__dict__[name] = float(value)