diff --git a/src/Discord/Builders/MessageBuilder.php b/src/Discord/Builders/MessageBuilder.php index 4566b6508..24acbe509 100644 --- a/src/Discord/Builders/MessageBuilder.php +++ b/src/Discord/Builders/MessageBuilder.php @@ -220,6 +220,16 @@ public function setPoll(Poll|null $poll): self return $this; } + /** + * Returns the poll of the message. + * + * @return Poll|null + */ + public function getPoll(): ?Poll + { + return $this->poll; + } + /** * Override the default username of the webhook. Only used for executing webhook. * @@ -318,6 +328,16 @@ public function setEmbeds(array $embeds): self return $this->addEmbed(...$embeds); } + /** + * Returns the embeds of the builder. + * + * @return Embed[] + */ + public function getEmbeds(): array + { + return $this->embeds; + } + /** * Sets the allowed mentions object of the message. * @@ -750,14 +770,6 @@ public function jsonSerialize(): ?array $body['poll'] = $this->poll; } - if (isset($this->enforce_nonce)) { - $body['enforce_nonce'] = $this->enforce_nonce; - } - - if (isset($this->poll)) { - $body['poll'] = $this->poll; - } - return $body; } }