$createPoll
$createPoll
will create a poll on the channel.
Usage
Parameters
Field | Type | Description | Required |
---|---|---|---|
channelID? | number | The channel ID where the poll will be created. | false |
question | string | The poll question. | true |
duration | string | The duration of the poll. This must be not less than 1 hour and not longer than 7 days. | false |
allowMultiselect? | boolean | Whether users are allowed to choose more than one answer. (Default: false) | false |
…answers | string | The emoji and answer for each options. | true |
Example(s)
This will create a one-hour poll with the question “Is aoi.js great?” with two options, only one answer can be chosen:
You can also remove the emojis: