-
-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
22cd24f
commit 7cdb7e6
Showing
2 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
/* | ||
* This file is a part of the DiscordPHP project. | ||
* | ||
* Copyright (c) 2015-present David Cole <[email protected]> | ||
* | ||
* This file is subject to the MIT license that is bundled | ||
* with this source code in the LICENSE.md file. | ||
*/ | ||
|
||
namespace Discord\Parts\Channel; | ||
|
||
use Carbon\Carbon; | ||
//use Discord\Builders\PartBuilder; | ||
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. | ||
* | ||
* @link https://discord.com/developers/docs/resources/poll#poll-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! | ||
*/ | ||
class PollMedia extends Part | ||
{ | ||
public const LAYOUT_DEFAULT = 1; // The, uhm, default layout type. | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected $fillable = [ | ||
'question', | ||
'answers', | ||
'duration', | ||
'allow_multiselect', | ||
'layout_type' | ||
]; | ||
|
||
// TODO | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters