File tree 8 files changed +52
-20
lines changed
8 files changed +52
-20
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,14 @@ export interface APIPoll {
22
22
expiry : string ;
23
23
/**
24
24
* Whether a user can select multiple answers
25
+ *
26
+ * @default false
25
27
*/
26
28
allow_multiselect : boolean ;
27
29
/**
28
30
* The layout type of the poll
31
+ *
32
+ * @default PollLayoutType.Default
29
33
*/
30
34
layout_type : PollLayoutType ;
31
35
/**
Original file line number Diff line number Diff line change @@ -22,10 +22,14 @@ export interface APIPoll {
22
22
expiry : string ;
23
23
/**
24
24
* Whether a user can select multiple answers
25
+ *
26
+ * @default false
25
27
*/
26
28
allow_multiselect : boolean ;
27
29
/**
28
30
* The layout type of the poll
31
+ *
32
+ * @default PollLayoutType.Default
29
33
*/
30
34
layout_type : PollLayoutType ;
31
35
/**
Original file line number Diff line number Diff line change @@ -20,15 +20,19 @@ export interface RESTGetAPIPollAnswerVotersQuery {
20
20
/**
21
21
* https://discord.com/developers/docs/resources/poll#poll-create-request-object-poll-create-request-object-structure
22
22
*/
23
- export interface RESTAPIPollCreate extends Omit < APIPoll , 'answers' | 'expiry' | 'results' > {
24
- /**
25
- * Number of hours the poll should be open for, up to 7 days
26
- */
27
- duration : number ;
23
+ export interface RESTAPIPollCreate
24
+ extends Omit < APIPoll , 'allow_multiselect' | 'answers' | 'expiry' | 'layout_type' | 'results' > ,
25
+ Partial < Pick < APIPoll , 'allow_multiselect' | 'layout_type' > > {
28
26
/**
29
27
* Each of the answers available in the poll, up to 10
30
28
*/
31
29
answers : Omit < APIPollAnswer , 'answer_id' > [ ] ;
30
+ /**
31
+ * Number of hours the poll should be open for, up to 32 days
32
+ *
33
+ * @default 24
34
+ */
35
+ duration ?: number ;
32
36
}
33
37
34
38
/**
Original file line number Diff line number Diff line change @@ -20,15 +20,19 @@ export interface RESTGetAPIPollAnswerVotersQuery {
20
20
/**
21
21
* https://discord.com/developers/docs/resources/poll#poll-create-request-object-poll-create-request-object-structure
22
22
*/
23
- export interface RESTAPIPollCreate extends Omit < APIPoll , 'answers' | 'expiry' | 'results' > {
24
- /**
25
- * Number of hours the poll should be open for, up to 7 days
26
- */
27
- duration : number ;
23
+ export interface RESTAPIPollCreate
24
+ extends Omit < APIPoll , 'allow_multiselect' | 'answers' | 'expiry' | 'layout_type' | 'results' > ,
25
+ Partial < Pick < APIPoll , 'allow_multiselect' | 'layout_type' > > {
28
26
/**
29
27
* Each of the answers available in the poll, up to 10
30
28
*/
31
29
answers : Omit < APIPollAnswer , 'answer_id' > [ ] ;
30
+ /**
31
+ * Number of hours the poll should be open for, up to 32 days
32
+ *
33
+ * @default 24
34
+ */
35
+ duration ?: number ;
32
36
}
33
37
34
38
/**
Original file line number Diff line number Diff line change @@ -22,10 +22,14 @@ export interface APIPoll {
22
22
expiry : string ;
23
23
/**
24
24
* Whether a user can select multiple answers
25
+ *
26
+ * @default false
25
27
*/
26
28
allow_multiselect : boolean ;
27
29
/**
28
30
* The layout type of the poll
31
+ *
32
+ * @default PollLayoutType.Default
29
33
*/
30
34
layout_type : PollLayoutType ;
31
35
/**
Original file line number Diff line number Diff line change @@ -22,10 +22,14 @@ export interface APIPoll {
22
22
expiry : string ;
23
23
/**
24
24
* Whether a user can select multiple answers
25
+ *
26
+ * @default false
25
27
*/
26
28
allow_multiselect : boolean ;
27
29
/**
28
30
* The layout type of the poll
31
+ *
32
+ * @default PollLayoutType.Default
29
33
*/
30
34
layout_type : PollLayoutType ;
31
35
/**
Original file line number Diff line number Diff line change @@ -20,15 +20,19 @@ export interface RESTGetAPIPollAnswerVotersQuery {
20
20
/**
21
21
* https://discord.com/developers/docs/resources/poll#poll-create-request-object-poll-create-request-object-structure
22
22
*/
23
- export interface RESTAPIPollCreate extends Omit < APIPoll , 'answers' | 'expiry' | 'results' > {
24
- /**
25
- * Number of hours the poll should be open for, up to 7 days
26
- */
27
- duration : number ;
23
+ export interface RESTAPIPollCreate
24
+ extends Omit < APIPoll , 'allow_multiselect' | 'answers' | 'expiry' | 'layout_type' | 'results' > ,
25
+ Partial < Pick < APIPoll , 'allow_multiselect' | 'layout_type' > > {
28
26
/**
29
27
* Each of the answers available in the poll, up to 10
30
28
*/
31
29
answers : Omit < APIPollAnswer , 'answer_id' > [ ] ;
30
+ /**
31
+ * Number of hours the poll should be open for, up to 32 days
32
+ *
33
+ * @default 24
34
+ */
35
+ duration ?: number ;
32
36
}
33
37
34
38
/**
Original file line number Diff line number Diff line change @@ -20,15 +20,19 @@ export interface RESTGetAPIPollAnswerVotersQuery {
20
20
/**
21
21
* https://discord.com/developers/docs/resources/poll#poll-create-request-object-poll-create-request-object-structure
22
22
*/
23
- export interface RESTAPIPollCreate extends Omit < APIPoll , 'answers' | 'expiry' | 'results' > {
24
- /**
25
- * Number of hours the poll should be open for, up to 7 days
26
- */
27
- duration : number ;
23
+ export interface RESTAPIPollCreate
24
+ extends Omit < APIPoll , 'allow_multiselect' | 'answers' | 'expiry' | 'layout_type' | 'results' > ,
25
+ Partial < Pick < APIPoll , 'allow_multiselect' | 'layout_type' > > {
28
26
/**
29
27
* Each of the answers available in the poll, up to 10
30
28
*/
31
29
answers : Omit < APIPollAnswer , 'answer_id' > [ ] ;
30
+ /**
31
+ * Number of hours the poll should be open for, up to 32 days
32
+ *
33
+ * @default 24
34
+ */
35
+ duration ?: number ;
32
36
}
33
37
34
38
/**
You can’t perform that action at this time.
0 commit comments