Ensure views added to Client.add_view are persistent views

This commit is contained in:
Rapptz committed 2021-05-31 23:08:08 -04:00
1 parent c811932ca7
commit 7c40e83d10
5 files changed
+26

No files matched your search

+1
View File
@@ -98,6 +98,7 @@ class Button(Item[V]):
if custom_id is not None and url is not None:
raise TypeError('cannot mix both url and custom_id with Button')
self._provided_custom_id = custom_id is not None
if url is None and custom_id is None:
custom_id = os.urandom(16).hex()