Discord Poll Bot is designed to implement Instant Runoff Voting in an easy to use Discord bot.
To create a poll use either the /create-vote
or /poll-modal
commands. Modals are limited to 4 choices.
![image](https://private-user-images.githubusercontent.com/2281608/287554041-3fd1b71d-9b0b-45e4-8c69-f29d46968f19.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk1NjEzMDAsIm5iZiI6MTcxOTU2MTAwMCwicGF0aCI6Ii8yMjgxNjA4LzI4NzU1NDA0MS0zZmQxYjcxZC05YjBiLTQ1ZTQtOGM2OS1mMjlkNDY5NjhmMTkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYyOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MjhUMDc1MDAwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YmQ3Nzc2NDk3MGUxNGMxNjAyOTQ3NzcyOWVmZGRhODJiNjJiOWExN2JjM2E0ZTI0MzFhYTdlMmQ3MzUwYWM5NCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.4c-tlBSZU5esiFcea02qV8YjU21y7ynI5tE9rIIsOAY)
![image](https://private-user-images.githubusercontent.com/2281608/287554219-8490f240-e386-4146-9f04-0e94f2e78b19.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk1NjEzMDAsIm5iZiI6MTcxOTU2MTAwMCwicGF0aCI6Ii8yMjgxNjA4LzI4NzU1NDIxOS04NDkwZjI0MC1lMzg2LTQxNDYtOWYwNC0wZTk0ZjJlNzhiMTkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYyOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MjhUMDc1MDAwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZGNiYWViODBjMmJmZmUwZTFhZjgwZGU3ZDhkMDJlMzAwMjhmZDk5M2M2ZDk3YThiNWE3MzA0ZTMwYzZmOWU3MCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.cfyfy_ZkYXiWoXP37JYLs-UJiR4hUsH_ow8f-pt8PT0)
To vote on a poll simply press the vote button on a poll and you will be presented with a series of messages where you can pick your top choices in order.
![image](https://private-user-images.githubusercontent.com/2281608/287554118-d1f6668e-849f-42e4-b740-4c608ded2419.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk1NjEzMDAsIm5iZiI6MTcxOTU2MTAwMCwicGF0aCI6Ii8yMjgxNjA4LzI4NzU1NDExOC1kMWY2NjY4ZS04NDlmLTQyZTQtYjc0MC00YzYwOGRlZDI0MTkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYyOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MjhUMDc1MDAwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YTAxODkwNGYyMzZmYjU3OTdiYTU0NmNiZjBlNGVlZTYzNTg2Y2M1ZmU3NDBhMjcwOTU4MzhhODIxMTZmMTk0OSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.wt7v3QM78uewhNZYVU16Cdm-xlvh-b5cLnFjRwmoLZs)
This bot requires the Bun runtime.
- Set up a Discord Bot Application.
- Clone the repository.
- Run
bun install
in the root of the cloned repository. - Create a file called
config.json
in the root directory and fill it out with the information from the bot you created in step 1.choiceCount
is the max amount of choices a user can create for a poll (Modals are limited to 4 choices).
config.json:
{
"token": string,
"clientId": string,
"choiceCount": number
}
- Run
bun deploy-commands
. - Run
bun start
to start the bot. - Add your bot's
clientId
to this url and go to it to invite the bot to your server:https://discord.com/api/oauth2/authorize?client_id=your client id here&permissions=274877908992&scope=bot
.