From abac04b759a8c9191935880de5cd686e5c146783 Mon Sep 17 00:00:00 2001 From: Nadir Chowdhury Date: Wed, 30 Jun 2021 01:03:50 +0100 Subject: [PATCH] Fix link buttons not being regarded as persistent --- discord/ui/button.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/discord/ui/button.py b/discord/ui/button.py index e5dc8a960..0f6ab9ee9 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