mirror of
				https://github.com/Rapptz/discord.py.git
				synced 2025-10-25 02:23:04 +00:00 
			
		
		
		
	Fallback to None message_id searches in View dispatch
Not all persistent views have an associated message_id attached to them. Fix #7319
This commit is contained in:
		| @@ -507,7 +507,9 @@ class ViewStore: | |||||||
|         self.__verify_integrity() |         self.__verify_integrity() | ||||||
|         message_id: Optional[int] = interaction.message and interaction.message.id |         message_id: Optional[int] = interaction.message and interaction.message.id | ||||||
|         key = (component_type, message_id, custom_id) |         key = (component_type, message_id, custom_id) | ||||||
|         value = self._views.get(key) |         # Fallback to None message_id searches in case a persistent view | ||||||
|  |         # was added without an associated message_id | ||||||
|  |         value = self._views.get(key) or self._views.get((component_type, None, custom_id)) | ||||||
|         if value is None: |         if value is None: | ||||||
|             return |             return | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user