diff --git a/src/Supportwebhook/Discord/DiscordWebhook.php b/src/Supportwebhook/Discord/DiscordWebhook.php index 6d8bdac..511aee8 100644 --- a/src/Supportwebhook/Discord/DiscordWebhook.php +++ b/src/Supportwebhook/Discord/DiscordWebhook.php @@ -14,13 +14,16 @@ class DiscordWebhook implements WebhookInterface protected array $config = []; - public function __construct(string $content = null) + public function __construct(?string $content = null) { $this->content($content); } public function content(?string $content = null): DiscordWebhook { + if ($content == null){ + return $this; + } if (strlen($content) > 2000) { throw new InvalidArgumentException('Embed content is limited to 2000 characters'); }