Post a vote
/api/votesPost a question in a Discord channel with a button for each option. Needs the Discord bot to be connected and to send messages in the channel.
Needs the ManagePosts permission.
An API key, made on Settings, API keys. Every key starts with mbk_.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/api/votes" \ -H "Content-Type: application/json" \ -d '{ "question": "string", "channelId": "string", "roleId": null, "options": null }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "question": "string", "channelId": "string", "roleId": null, "showCounts": true, "anonymous": true, "status": "string", "createdAt": "2019-08-24T14:15:22Z", "closedAt": null, "total": 0, "options": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "label": "string", "count": 0, "voters": null } ], "messageProblem": null}List votes GET
The most recent votes, newest first, each with how many people picked each option. Needs the `ViewPosts` permission.
Close a vote POST
Stop taking votes and rewrite the Discord message with the result. The vote is closed in Modbot even when Discord refuses the rewrite; the answer then says why. Needs the `ManagePosts` permission.