createPoll
Tạo cuộc bình chọn
api.createPoll(options, groupId)
Parameters
options
CreatePollOptions
groupId
string
CreatePollOptions
question
string
options
string[]
expiredTime
number?
Thời hạn của cuộc bình chọn, đơn vị mili giây, mặc định 0 (vô hạn)
pinAct
boolean?
Ghim cuộc bình chọn, mặc định false
allowMultiChoices
boolean?
Cho phép chọn nhiều lựa chọn, mặc định false
allowAddNewOption
boolean?
Cho phép thành viên thêm lựa chọn, mặc định false
hideVotePreview
boolean?
Ẩn kết quả cho đến khi người dùng bình chọn, mặc định false
isAnonymous
boolean?
Ẩn danh sách người bình chọn, mặc định false
Return
Promise<CreatePollResponse>
CreatePollResponse
creator
string
question
string
options
string[]
joined
boolean
closed
boolean
poll_id
string
allow_multi_choices
boolean
allow_add_new_option
boolean
is_anonymous
boolean
poll_type
number
created_time
number
updated_time
number
expiried_time
number
is_hide_vote_preview
boolean
num_vote
number
Examples
Tạp cuộc bình chọn mới
Javascript
Typescript
Last updated