Add poll chat command with reaction voting

This commit is contained in:
Fisto
2026-09-11 15:59:08 +02:00
parent 8e8c15e8bc
commit ace0bb18ff
16 changed files with 291 additions and 9 deletions
+16
View File
@@ -37,6 +37,7 @@ mention the puppet first.
| `whitelist list` | Show the owner and the trusted users with their tiers. |
| `whitelist add @user [user\|trusted\|admin]` | Add one or more users. The default tier is `user`. |
| `whitelist remove @user` | Remove one or more users from the trust list. |
| `poll <question> \| <opt 1> \| <opt 2> [\| opt 3 [\| opt 4]]` | Start a reaction poll. |
Notes:
@@ -45,6 +46,21 @@ Notes:
- `whitelist` commands need the admin tier.
- The reply follows the response policy.
## Polls
The `poll` command posts a message and adds one number emoji per option. Discord users vote by
reacting. The poll closes after `pollSeconds` (default 120) and the daemon posts the result.
- Options: 2 to 4. Each option is at most 80 characters.
- Emojis: `1️⃣`, `2️⃣`, `3️⃣`, `4️⃣`.
- One vote per user. A new vote replaces the old vote.
- Removing the reaction removes the vote.
- The puppet's own reactions do not count.
- Votes do not need a trust tier. Friends can vote.
- The result message goes to the poll channel.
Example: `@puppet poll Lunch? | Pizza | Sushi`
## Response policy
The policy decides where a reply goes. Sensitive replies go by DM.