2021-06-19 16:39:23 +02:00
.. _plugin-Poll:
Documentation for the Poll plugin for Supybot
=============================================
Purpose
-------
2021-12-04 02:50:28 +01:00
2021-06-19 16:39:23 +02:00
Poll: Provides a simple way to vote on answers to a question
Usage
-----
2021-12-04 02:50:28 +01:00
2021-06-19 16:39:23 +02:00
Provides a simple way to vote on answers to a question
2021-06-19 16:56:10 +02:00
For example, this creates a poll::
<admin> @poll add "Is this a test?" "Yes" "No" "Maybe"
<bot> The operation succeeded. Poll # 42 created.
Creates a poll that can be voted on in this way::
<citizen1> @vote 42 Yes
<citizen2> @vote 42 No
<citizen3> @vote 42 No
And results::
<admin> @poll results
2021-06-23 11:37:37 +02:00
<bot> 2 votes for No, 1 vote for Yes, and 0 votes for Maybe
2021-06-19 16:56:10 +02:00
Longer answers are possible, and voters only need to use the first
word of each answer to vote. For example, this creates a poll that
can be voted on in the same way::
<admin> @poll add "Is this a test?" "Yes totally" "No no no" "Maybe"
<bot> The operation succeeded. Poll # 43 created.
You can also add a number or letter at the beginning of each question to
make it easier::
<admin> @poll add "Who is the best captain?" "1 James T Kirk" "2 Jean-Luc Picard" "3 Benjamin Sisko" "4 Kathryn Janeway"
<bot> The operation succeeded. Poll # 44 created.
<trekkie1> @vote 42 1
<trekkie2> @vote 42 4
<trekkie3> @vote 42 4
2021-06-19 16:39:23 +02:00
.. _commands-Poll:
Commands
--------
2021-12-04 02:50:28 +01:00
2021-06-19 16:39:23 +02:00
.. _command-poll-add:
add [<channel> ] <question> <answer1> [<answer2> [<answer3> [...]]]
Creates a new poll with the specified <question> and answers on the <channel>. The first word of each answer is used as its id to vote, so each answer should start with a different word. <channel> is only necessary if this command is run in private, and defaults to the current channel otherwise.
.. _command-poll-close:
close [<channel> ] <poll_id>
Closes the specified poll.
2023-01-12 22:24:04 +01:00
.. _command-poll-list:
list [<channel> ]
Lists open polls in the <channel>.
2021-06-19 16:39:23 +02:00
.. _command-poll-results:
results [<channel> ] <poll_id>
Returns the results of the specified poll.
.. _command-poll-vote:
vote [<channel> ] <poll_id> <answer_id>
Registers your vote on the poll <poll_id> as being the answer identified by <answer_id> (which is the first word of each possible answer).
.. _conf-Poll:
Configuration
-------------
.. _conf-supybot.plugins.Poll.public:
supybot.plugins.Poll.public
2021-12-04 03:19:12 +01:00
This config variable defaults to "True", is not network-specific, and is not channel-specific.
2021-06-19 16:39:23 +02:00
Determines whether this plugin is publicly visible.
.. _conf-supybot.plugins.Poll.requireManageCapability:
supybot.plugins.Poll.requireManageCapability
2021-12-04 03:19:12 +01:00
This config variable defaults to "channel,op; channel,halfop", is network-specific, and is channel-specific.
2021-06-19 16:39:23 +02:00
Determines the capabilities required (if any) to open and close polls. Use 'channel,capab' for channel-level capabilities. Note that absence of an explicit anticapability means user has capability.