A bot made for the Blurple Events team that automates the creation of contests and leaderboard, and also has a built-in music player.
We had an art contest in 2021 where people could submit their art and get voted on. What we forgot to plan was how we could anonymously register these votes and export out a leaderboard as well.
This bot basically does that. The Events team can now create contests and leaderboards (I will explain both of these types further down) - and it also has a nice music feature as well for karaoke nights or other events.
Requirements:
- Docker (https://www.docker.com/)
- Docker Compose (https://docs.docker.com/compose/install/) (usually comes with Docker)
- A Discord bot (https://discord.com/developers/applications) with the Privileged Member Intent
Initial setup:
- Copy
example.env
to.env
and fill in the values
When you want to start the bot: npm run docker
When you want to stop the bot: npm run docker:down
Although it also works without, we strongly recommend using Docker for this. If you're unexperienced or just want it up and running then use Docker.
Now with Permissions v2, the bot will not need a built-in permission system. The only thing it has is a list of admin roles that can manage submissions and edit leaderboards as these are not interactions. Commands are handled by the built-in Discord permission system now.
You can choose where and who can use these commands. A participant won't need any commands to interact and participate with bots.
A contest is a collection system of submissions where people can submit either an image or text, depending on the contest type, and vote on other submissions. It's also timed so the submission phase and voting phase are open whenever you want. When the voting period ends, results are revealed.
You can create a contest with the command /contests create
and then edit it with the command /contests edit
later if you need to. If you want to see a list of all contests, you can use the command /contests list
, and, finally, you can remove a contest with the command /contests remove
.
When you've set up a contest, you need a submit button. The button will act as a way for participants to submit their work. Create one with the command /contests post_button
.
You can also list and filter participants in a contest with the command /contests list_participants
.
A leaderboard is a way to manually managing a contest. If the sole purpose is to have a leaderboard of participants, without any form of submission, then this will be the tool to use.
If you want to edit the leaderboard then click the button, and it will appear like this. Each line is Name: Score
, and multiple entries are separated with a new line. The bot will automatically sort the leaderboard before updating.