This commit is contained in:
Mateusz Pieła 2021-05-15 12:01:18 +02:00
parent 91e25ad3c0
commit ae66154be2
2 changed files with 10 additions and 8 deletions

View file

@ -21,15 +21,17 @@ class discord
return $this->json->content;
}
if(!empty($this->json->embeds->title))
$this->readable .= PHP_EOL;
if(!empty($this->json->embeds[0]->title))
{
$this->readable .= $this->json->embeds->title . PHP_EOL;
$this->readable .= $this->json->embeds[0]->title . PHP_EOL;
}
if(!empty($this->json->embeds->description))
if(!empty($this->json->embeds[0]->description))
{
$this->readable .= preg_replace("/(?:__|[*#])|\[(.*?)\]\(.*?\)/"," ",$this->json->embeds->description) . PHP_EOL;
$this->readable .= $this->json->embeds->url;
$this->readable .= preg_replace("/(?:__|[*#])|\[(.*?)\]\(.*?\)/"," ",$this->json->embeds[0]->description) . PHP_EOL;
$this->readable .= $this->json->embeds[0]->url;
}
return $this->readable;