From d7b9a1aaf0b0dc379ba4a9a0dcf00bfe6539cd2c Mon Sep 17 00:00:00 2001 From: nulldomain Date: Tue, 3 Oct 2023 10:10:31 +0100 Subject: [PATCH] Don't call set_desc_locales on non-SlashCommandBuilder instances --- lightbulb/internal.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lightbulb/internal.py b/lightbulb/internal.py index d932a806..2f1a09c1 100644 --- a/lightbulb/internal.py +++ b/lightbulb/internal.py @@ -140,7 +140,8 @@ def _create_builder_from_command( if cmd.app_command_default_member_permissions is not None: bld.set_default_member_permissions(cmd.app_command_default_member_permissions) bld.set_name_localizations(cmd.name_localizations) - bld.set_description_localizations(cmd.description_localizations) + if isinstance(bld, hikari.api.SlashCommandBuilder): + bld.set_description_localizations(cmd.description_localizations) bld.set_is_dm_enabled(cmd.app_command_dm_enabled) bld.set_is_nsfw(cmd.nsfw)