Ensure views added to Client.add_view are persistent views

This commit is contained in:
Rapptz
2021-05-31 23:08:08 -04:00
parent c811932ca7
commit 7c40e83d10
5 changed files with 26 additions and 0 deletions

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()