aboutsummaryrefslogtreecommitdiff
path: root/discord
diff options
context:
space:
mode:
Diffstat (limited to 'discord')
-rw-r--r--discord/ui/button.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/discord/ui/button.py b/discord/ui/button.py
index e5dc8a96..0f6ab9ee 100644
--- a/discord/ui/button.py
+++ b/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