$createPoll
$createPoll will create a poll on the channel.
Usage
$createPoll[channelID?;question;duration;allowMultiselect?;...answers]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:
1client.command({2 name: "createPoll",3 code: `$createPoll[$channelID;Is aoi.js great?;1h;false;Yes:✅;No:❌]`4});You can also remove the emojis:
1client.command({2 name: "createPoll",3 code: `$createPoll[$channelID;Is aoi.js great?;1h;false;Yes;No]`4});