Skip to content

Commit 43a09e1

Browse files
author
Aiden
authored
fix: AttributeError in emoji conversion for options (#1279)
1 parent 8c96732 commit 43a09e1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

interactions/models/discord/components.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,11 +375,13 @@ def converter(cls, value: Any) -> "StringSelectOption":
375375

376376
@classmethod
377377
def from_dict(cls, data: discord_typings.SelectMenuOptionData) -> "StringSelectOption":
378+
emoji = process_emoji(data.get("emoji"))
379+
emoji = PartialEmoji.from_dict(emoji) if emoji else None
378380
return cls(
379381
label=data["label"],
380382
value=data["value"],
381383
description=data.get("description"),
382-
emoji=process_emoji(data.get("emoji")),
384+
emoji=emoji,
383385
default=data.get("default", False),
384386
)
385387

0 commit comments

Comments
 (0)