diff options
| author | Rapptz <[email protected]> | 2021-04-28 01:48:39 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2021-05-27 00:53:14 -0400 |
| commit | 5e96ad9261048507044c3bed0b6768f31d3c85d5 (patch) | |
| tree | 613083fc6607a74e63fb3b2836aee4c4eefee271 | |
| parent | Add aliases for button style colours (diff) | |
| download | discord.py-5e96ad9261048507044c3bed0b6768f31d3c85d5.tar.xz discord.py-5e96ad9261048507044c3bed0b6768f31d3c85d5.zip | |
Force button style to link if a URL is passed
| -rw-r--r-- | discord/ui/button.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/discord/ui/button.py b/discord/ui/button.py index b81266aa..8d208257 100644 --- a/discord/ui/button.py +++ b/discord/ui/button.py @@ -115,6 +115,9 @@ class Button(Item[V]): if url is None and custom_id is None: custom_id = os.urandom(16).hex() + if url is not None: + style = ButtonStyle.link + self._underlying = ButtonComponent._raw_construct( type=ComponentType.button, custom_id=custom_id, |