1
0
mirror of https://github.com/Rapptz/discord.py.git synced 2025-05-09 15:29:57 +00:00

Skip adding views to the synced message store if fully dynamic

This commit is contained in:
Rapptz 2023-07-22 00:45:03 -04:00
parent f793af0456
commit 94655cd804

@ -569,15 +569,17 @@ class ViewStore:
return
dispatch_info = self._views.setdefault(message_id, {})
is_fully_dynamic = True
for item in view._children:
if isinstance(item, DynamicItem):
pattern = item.__discord_ui_compiled_template__
self._dynamic_items[pattern] = item.__class__
elif item.is_dispatchable():
dispatch_info[(item.type.value, item.custom_id)] = item # type: ignore
is_fully_dynamic = False
view._cache_key = message_id
if message_id is not None:
if message_id is not None and not is_fully_dynamic:
self._synced_message_views[message_id] = view
def remove_view(self, view: View) -> None: