PollCreateParams

@objc(SBDPollCreateParams)
public class PollCreateParams : NSObject
extension PollCreateParams: Encodable

Represents a parameter object to create or update poll object

Since

4.1.0
  • Title of this poll

    Declaration

    Swift

    @objc
    public var title: String
  • An additional data to accompany the poll. Can be used to provide explanations for incorrect quiz answers

    Declaration

    Swift

    @objc
    public var data: PollData?
  • Possible options for which a user can vote

    Note

    this property is only valid when creating a poll, ignored when updating a poll

    Declaration

    Swift

    @objc
    public var optionTexts: [String]
  • Whether to make the votes anonymous. Default is false

    Declaration

    Swift

    @objc
    public var isAnonymous: Bool
  • Whether to allow user-suggested options. Default is false

    Declaration

    Swift

    @objc
    public var allowUserSuggestion: Bool
  • Whether to allow multiple vote casting. Default is false

    Declaration

    Swift

    @objc
    public var allowMultipleVotes: Bool
  • Unix timestamp at which the poll has closed or will close (millisecond)

    Declaration

    Swift

    @objc
    public var closeAt: Int64
  • Encodes this object.

    Declaration

    Swift

    public func encode(to encoder: Encoder) throws

    Parameters

    encoder

    Encoder instance