Skip to content

Commit

Permalink
feat(Poll): add Duration field
Browse files Browse the repository at this point in the history
  • Loading branch information
FedorLap2006 committed Jun 21, 2024
1 parent 7f4e978 commit 2112864
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2337,12 +2337,16 @@ type PollResults struct {
type Poll struct {
Question PollMedia `json:"question"`
Answers []PollAnswer `json:"answers"`
Expiry time.Time `json:"expiry"`
AllowMultiselect bool `json:"allow_multiselect"`
LayoutType PollLayoutType `json:"layout_type"`

// NOTE: should be set only on creation, when fetching use Expiry.
Duration int `json:"duration"`

// NOTE: available only when fetching.

Results *PollResults `json:"results,omitempty"`
Expiry *time.Time `json:"expiry,omitempty"`
}

// Constants for the different bit offsets of text channel permissions
Expand Down

0 comments on commit 2112864

Please sign in to comment.