From 4089c3d4ebc95c8a5714e419124a3db38f76032e Mon Sep 17 00:00:00 2001 From: George M <32426140+iHeroGH@users.noreply.github.com> Date: Sat, 10 Feb 2024 22:28:52 -0800 Subject: [PATCH] Allow ApplicationCommandChoice value to be 0 Originally, value = value or name would set the value to the name attribute if the value was 0. This change prevents that by explicitly checking if the value is None rather than 0. --- novus/models/application_command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/novus/models/application_command.py b/novus/models/application_command.py index 641e8281..f373b7fd 100644 --- a/novus/models/application_command.py +++ b/novus/models/application_command.py @@ -283,7 +283,7 @@ def __init__( *, name_localizations: LocType = None): self.name = name - self.value = value or name + self.value = value if value is not None else name self.name_localizations = flatten_localization(name_localizations) def _to_data(self) -> payloads.ApplicationCommandChoice: