private function _getData() { $embed = $this->embed; $embeds = $this->embeds; if ($embed || $embeds) { // sort embeds by key first before adding the main embed so it doesn't change the order ksort($embeds); if ($embed) array_splice($embeds, $this->_offsetIndex, 0, [$embed]); } $data = [ "content" => $this->content, "username" => $this->username, "avatar_url" => $this->avatarUrl, "tts" => $this->tts, "allowed_mentions" => $this->allowedMentions, "flags" => $this->flags, "embeds" => $embeds, "attachments" => $this->attachments, "thread_name" => $this->threadName, ]; return json_encode($data); } PHP private function _getData() { $embed = $this->embed; $embeds = $this->embeds; if ($embed || $embeds) { // sort embeds by key first before adding the main embed so it doesn't change the order ksort($embeds); if ($embed) array_splice($embeds, $this->_offsetIndex, 0, [$embed]); } $data = [ "content" => $this->content, "username" => $this->username, "avatar_url" => $this->avatarUrl, "tts" => $this->tts, "allowed_mentions" => $this->allowedMentions, "flags" => $this->flags, "embeds" => $embeds, "attachments" => $this->attachments, "thread_name" => $this->threadName, ]; return json_encode($data); } Вот эта строка return json_encode($data); еррорит
$data = array( "content" => $this->content, "username" => $this->username, "avatar_url" => $this->avatarUrl, "tts" => $this->tts, "allowed_mentions" => $this->allowedMentions, "flags" => $this->flags, "embeds" => $embeds, "attachments" => $this->attachments, "thread_name" => $this->threadName, ); PHP $data = array( "content" => $this->content, "username" => $this->username, "avatar_url" => $this->avatarUrl, "tts" => $this->tts, "allowed_mentions" => $this->allowedMentions, "flags" => $this->flags, "embeds" => $embeds, "attachments" => $this->attachments, "thread_name" => $this->threadName, ); Так попробуй