Version 2.0.0
Features
- When voting begins, all pictures are reposted with the letter to vote for them added in the corner. (closes #9) π π π π
- EXIF rotation information is parsed and used to correctly rotate images for the voting stage.
- The bot can be killed and resumed at any point in the submission/voting/results periods.
- The file loading and parsing modules give useful errors in the case of malformed configs or corrupted state information.
- Improved log severity level usage makes important information easily visible but keeps the log file somewhat concise.
Rework of commands
Commands have been simplified and there are now only 6 of them. All commands can only be used by admins (as defined in the config file). The bot's command prefix is also configurable in the config file.
The bot now has two distinct ways (modes) of deciding when to switch between periods:
- automatic mode - the bot automatically switches period at the times of day set out in the README.
- manual mode - the bot ignores the time and only switches when given a command to do so.
Commands:
submit
- open submissions (and switch to manual mode).vote
- open voting (and switch to manual mode).result
- display the results of the voting (and switch to manual mode).automatic
- switch back to automatic mode.version
- check which release (and specific commit) of the bot is in use.state
- dump the bot's state to a text channel for debugging.
Changes
- The project has been extensively re-factored to improve readability, configurability and reliability.
- The updated README walks you through installing, setting up and configuring the bot.
- Many unused but imported modules have been removed.
- The config file is now gitignored and untracked. This means you cannot accidentally commit your bot's token to GitHub!
- The bot now only requires two channels to be configured: the main submission/voting/results channel and a channel for the leaderboard.
- The references to these channels are now cached and no longer passed between modules unnecessarily.
requirements.txt
now specifies the exact version of each dependency.letter_to_user_id_map
is now calledvoting_map
.config/
folder holds the config for the bot.data/
folder holds all generated state information.static/
folder holds all static resources.- .gitignore has been rewritten to only include files relevant to this project.
after_invoke
hook means the message that sent a command can be deleted without having to repeat that code in every command handler.- Many misc. code readability improvements.