Repository: slackapi/python-slack-sdk (Python)

Issue:
Invalid value property set on LinkButtonElement
### Description

Describe your issue here.

### What type of issue is this? (place an `x` in one of the `[ ]`)
- [x] bug
- [ ] enhancement (feature request)
- [ ] question
- [ ] documentation related
- [ ] testing related
- [ ] discussion

### Requirements (place an `x` in each of the `[ ]`)
* [x] I've read and understood the [Contributing guidelines](https://github.com/slackapi/python-slackclient/blob/master/.github/contributing.md) and have done my best effort to follow them.
* [x] I've read and agree to the [Code of Conduct](https://slackhq.github.io/code-of-conduct).
* [x] I've searched for any related issues and avoided creating a duplicate issue.

---

### Bug Report

Filling out the following details about bugs will help us solve your issue sooner.

#### Reproducible in:

slackclient version: 2.3.1

python version: 3.8

OS version(s): Ubuntu 18.04.3 LTS

#### Steps to reproduce:

If we create a `SectionBlock` with a `LinkButtonElement` as an accesory, the resulting JSON is invalid according to the [Slack Block Kit Builder](https://api.slack.com/tools/block-kit-builder?mode=message&blocks=%5B%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22text%22%3A%22Testing%20LinkButtonElement%22%2C%22verbatim%22%3Afalse%2C%22type%22%3A%22mrkdwn%22%7D%2C%22accessory%22%3A%7B%22action_id%22%3A%22PHSNCSAGPQCEGLGO%22%2C%22url%22%3A%22http%3A%2F%2Fslack.com%22%2C%22value%22%3A%22%22%2C%22type%22%3A%22button%22%2C%22text%22%3A%7B%22emoji%22%3Atrue%2C%22text%22%3A%22%3Amovie_camera%3A%20Watch%20it%20now%22%2C%22type%22%3A%22plain_text%22%7D%7D%7D%5D).

```python
SectionBlock(
    text="Testing LinkButtonElement",
    accessory=LinkButtonElement(
        text="":movie_camera: Watch it now"", 
        url="https://slack.com"
    )
)
```

#### Expected result:

The json output should be a valid block. The `value` property should not be added to the `LinkButtonElement`.

#### Actual result:

The `LinkButtonElement` has `value=""` which is invalid.



Discussion:

Patch:
diff --git a/slack/web/classes/elements.py b/slack/web/classes/elements.py
index d448d31e9..f52b8c4a3 100644
--- a/slack/web/classes/elements.py
+++ b/slack/web/classes/elements.py
@@ -159,6 +159,13 @@ def __init__(self, *, text: str, url: str, style: Optional[str] = None):
     def url_length(self):
         return len(self.url) <= self.url_max_length
 
+    def to_dict(self) -> dict:
+        json = super().to_dict()
+        # LinkButtonElements don't use the value property so we can just remove it
+        if "value" in json:
+            del json["value"]
+        return json
+
 
 class AbstractSelector(InteractiveElement, metaclass=ABCMeta):
     placeholder_max_length = 150


Test patch:
diff --git a/tests/web/classes/test_elements.py b/tests/web/classes/test_elements.py
index f9ca47f11..fd4b48817 100644
--- a/tests/web/classes/test_elements.py
+++ b/tests/web/classes/test_elements.py
@@ -84,7 +84,6 @@ def test_json(self):
                 "text": {"emoji": True, "text": "button text", "type": "plain_text"},
                 "url": "http://google.com",
                 "type": "button",
-                "value": "",
                 "action_id": button.action_id,
             },
         )