Browse Source
Fix link buttons not being regarded as persistent
pull/7135/head
Nadir Chowdhury
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
0 deletions
-
discord/ui/button.py
|
|
@ -217,6 +217,11 @@ class Button(Item[V]): |
|
|
|
def is_dispatchable(self) -> bool: |
|
|
|
return self.custom_id is not None |
|
|
|
|
|
|
|
def is_persistent(self) -> bool: |
|
|
|
if self.style is ButtonStyle.link: |
|
|
|
return self.url is not None |
|
|
|
return super().is_persistent() |
|
|
|
|
|
|
|
def refresh_component(self, button: ButtonComponent) -> None: |
|
|
|
self._underlying = button |
|
|
|
|
|
|
|