MadelineProtoDocs/old_docs/API_docs_v105/constructors/poll.md

42 lines
914 B
Markdown
Raw Normal View History

2019-09-13 17:13:55 +02:00
---
title: poll
description: Poll
image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
---
# Constructor: poll
[Back to constructors index](index.md)
Poll
### Attributes:
| Name | Type | Required | Description |
|----------|---------------|----------|-------------|
2019-12-27 17:48:04 +01:00
|id|[long](../types/long.md) | Yes|ID of the poll|
|closed|[Bool](../types/Bool.md) | Optional|Whether the poll is closed and doesn't accept any more answers|
|question|[string](../types/string.md) | Yes|The question of the poll|
2019-09-13 17:13:55 +02:00
|answers|Array of [PollAnswer](../types/PollAnswer.md) | Yes|Answers|
### Type: [Poll](../types/Poll.md)
### Example:
```php
$poll = ['_' => 'poll', 'id' => long, 'closed' => Bool, 'question' => 'string', 'answers' => [PollAnswer, PollAnswer]];
```
Or, if you're into Lua:
```lua
poll={_='poll', id=long, closed=Bool, question='string', answers={PollAnswer}}
```