Skip to content

Commit

Permalink
Update DiscordWebhook.php
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkIncognito85 authored Jan 21, 2023
1 parent 12293c3 commit d3ec08f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Supportwebhook/Discord/DiscordWebhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down

0 comments on commit d3ec08f

Please sign in to comment.