Fix InteractionCallbackResponse.resource having incorrect state

Fix InteractionCallbackResponse.resource being created
with a ConnectionState instead of _InteractionMessageState
This commit is contained in:
DA344 2025-02-19 23:15:07 +01:00 committed by GitHub
parent 470323493e
commit 0e4f06103e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -727,7 +727,7 @@ class InteractionCallbackResponse(Generic[ClientT]):
activity_instance = resource.get('activity_instance')
if message is not None:
self.resource = InteractionMessage(
state=self._state,
state=_InteractionMessageState(self._parent, self._state), # pyright: ignore[reportArgumentType]
channel=self._parent.channel, # type: ignore # channel should be the correct type here
data=message,
)