diff --git a/src/Discord/Parts/Channel/PollMedia.php b/src/Discord/Parts/Channel/PollMedia.php index e7d1d636b..311373f5c 100644 --- a/src/Discord/Parts/Channel/PollMedia.php +++ b/src/Discord/Parts/Channel/PollMedia.php @@ -16,32 +16,24 @@ use Discord\Parts\Part; /** - * The poll object has a lot of levels and nested structures. It was also designed to support future extensibility, so some fields may appear to be more complex than necessary. - * This is the request object used when creating a poll across the different endpoints. It is similar but not exactly identical to the main poll object. The main difference is that the request has duration which eventually becomes expiry. + * The poll media object is a common object that backs both the question and answers. The intention is that it allows us to extensibly add new ways to display things in the future. For now, question only supports text, while answers can have an optional emoji. * - * @link https://discord.com/developers/docs/resources/poll#poll-object + * @link https://discord.com/developers/docs/resources/poll#poll-media-object * * * - * @property PollMedia|string $question The question of the poll. Only text is supported. - * @property PollAnswer[] $answers Each of the answers available in the poll, up to 10. - * @property int $duration Number of hours the poll should be open for, up to 7 days. - * @property bool $allow_multiselect Whether a user can select multiple answers. - * @property int|null $layout_type? The layout type of the poll. Defaults to... DEFAULT! + * @property string|null $text The text of the field. Text should always be non-null for both questions and answers, but please do not depend on that in the future. The maximum length of text is 300 for the question, and 55 for any answer. + * @property Emoji|string|null $emoji The emoji of the field. When creating a poll answer with an emoji, one only needs to send either the id (custom emoji) or name (default emoji) as the only field. */ class PollMedia extends Part { - public const LAYOUT_DEFAULT = 1; // The, uhm, default layout type. /** * {@inheritdoc} */ protected $fillable = [ - 'question', - 'answers', - 'duration', - 'allow_multiselect', - 'layout_type' + 'text', + 'emoji' ]; // TODO