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:
@@ -412,9 +412,7 @@ class ConnectionState(Generic[ClientT]):
|
||||
self._stickers[sticker_id] = sticker = GuildSticker(state=self, data=data)
|
||||
return sticker
|
||||
|
||||
def store_view(self, view: BaseView, message_id: Optional[int] = None, interaction_id: Optional[int] = None) -> None:
|
||||
if interaction_id is not None:
|
||||
self._view_store.remove_interaction_mapping(interaction_id)
|
||||
def store_view(self, view: BaseView, message_id: Optional[int] = None) -> None:
|
||||
self._view_store.add_view(view, message_id)
|
||||
|
||||
def prevent_view_updates_for(self, message_id: int) -> Optional[BaseView]:
|
||||
|
||||
Reference in New Issue
Block a user