Force button style to link if a URL is passed

This commit is contained in:
Rapptz 2021-04-28 01:48:39 -04:00
parent 80fd222ca0
commit 5e96ad9261

View File

@ -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,