Skip to content

Commit 254c29a

Browse files
Fix ActionRowBuilder inner-type assertion (#912)
1 parent f5b2f0c commit 254c29a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

changes/912.bugfix.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix error message given by action row when a conflicted type is added.

hikari/impl/special_endpoints.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,9 @@ def components(self) -> typing.Sequence[special_endpoints.ComponentBuilder]:
12441244

12451245
def _assert_can_add_type(self, type_: messages.ComponentType, /) -> None:
12461246
if self._stored_type is not None and self._stored_type != type_:
1247-
raise ValueError(f"{type_} component type cannot be added to a container which already holds {type_}")
1247+
raise ValueError(
1248+
f"{type_} component type cannot be added to a container which already holds {self._stored_type}"
1249+
)
12481250

12491251
self._stored_type = type_
12501252

0 commit comments

Comments
 (0)