We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e59844 commit 936a3b8Copy full SHA for 936a3b8
src/Discord/Builders/Components/Label.php
@@ -110,12 +110,14 @@ public function setLabel(string $label): self
110
*/
111
public function setDescription(?string $description = null): self
112
{
113
- if (poly_strlen($description) === 0) {
114
- $description = null;
115
- }
116
-
117
- if (poly_strlen($description) > 100) {
118
- throw new \LengthException('Description must be between 0 and 100 in length.');
+ if (isset($description)) {
+ if (poly_strlen($description) === 0) {
+ $description = null;
+ }
+
+ if (poly_strlen($description) > 100) {
119
+ throw new \LengthException('Description must be between 0 and 100 in length.');
120
121
}
122
123
$this->description = $description;
0 commit comments