diff --git a/.gitignore b/.gitignore index 189d7da8..e80fb635 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ composer.phar composer.lock vendor/ -build/ \ No newline at end of file +build/ diff --git a/src/Objects/Message.php b/src/Objects/Message.php index 84a92264..31b492e7 100644 --- a/src/Objects/Message.php +++ b/src/Objects/Message.php @@ -84,6 +84,7 @@ public function relations() 'contact' => Contact::class, 'location' => Location::class, 'venue' => Venue::class, + 'poll' => Poll::class, 'new_chat_members' => User::class, 'left_chat_member' => User::class, 'new_chat_photo' => PhotoSize::class, @@ -97,7 +98,7 @@ public function relations() /** * Determine if the message is of given type. * - * @param string $type + * @param string $type * * @return bool */ @@ -129,6 +130,7 @@ public function detectType() 'contact', 'location', 'venue', + 'poll', 'new_chat_member', 'left_chat_member', 'new_chat_title', diff --git a/src/Objects/Poll.php b/src/Objects/Poll.php index 1caf0881..aed6e198 100644 --- a/src/Objects/Poll.php +++ b/src/Objects/Poll.php @@ -6,10 +6,15 @@ * Class Poll. * * - * @property string $id Unique poll identifier - * @property string $question Poll question, 1-255 characters. - * @property PollOption[] $options List of poll options - * @property bool $isClosed True, if the poll is closed. + * @property string $id Unique poll identifier + * @property string $question Poll question, 1-255 characters. + * @property PollOption[] $options List of poll options + * @property int $totalVoterCount Total number of users that voted in the poll + * @property bool $isClosed True, if the poll is closed. + * @property bool $isAnonymous True, if the poll is anonymous. + * @property string $type Poll type, currently can be “regular” or “quiz” + * @property bool $allowMultipleAnswers True, if the poll allows multiple answers. + * @property int $correctOptionId Optional. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot. */ class Poll extends BaseObject {