mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-03-05 03:02:49 +00:00
Remove old workaround to /callback not having a return type
The old code needed a workaround using interaction_id to differentiate between multiple instances being reused since they would all go into the `None` key. Since /callback now returns a proper message_id this could be used as a key instead of None. From testing, it seems this is true for both edit_message and send_message responses.
This commit is contained in:
@@ -1415,11 +1415,7 @@ class PartialMessage(Hashable):
|
||||
message = Message(state=self._state, channel=self.channel, data=data)
|
||||
|
||||
if view and not view.is_finished() and view.is_dispatchable():
|
||||
interaction: Optional[MessageInteractionMetadata] = getattr(self, 'interaction_metadata', None)
|
||||
if interaction is not None:
|
||||
self._state.store_view(view, self.id, interaction_id=interaction.id)
|
||||
else:
|
||||
self._state.store_view(view, self.id)
|
||||
self._state.store_view(view, self.id)
|
||||
|
||||
if delete_after is not None:
|
||||
await self.delete(delay=delete_after)
|
||||
|
||||
Reference in New Issue
Block a user