- Tested Submission.count descriptor
- Tested Submission.clear_other_votes
- Expanded Submission.advance testing to include exceptions, Submission
.active, Submission.completed and Submission.voting
- Changed db model __repr__ implementations to use f-strings
- Fixed Submission.update force kwarg not implemented.
- Small formatting changes, new TODO, noinspection on protected access
- Votes setter now removes duplicate keys (maintains order)
- Removed 'aiosqlite' from Pipfile general package requirements
- As well as other possible flaws in various functions of the bot's
operation.
- Fixed inactive prematurely closed Period's showing their final state
instead of Finished.
- Periods closed improperly through the 'close' command were not being
shown properly through the 'status' command.
- Fixed error in Submission state checking in on_message handling.
- Added embed support to 'close' command message responses.
To be honest, the checks are sort of randomly placed how I wanted them.
There is no true rhyme or reason to the logic implemented here, but it
really shouldn't matter anyways - it will do the job.
Also:
- Removed emotes from some of the error messages.
- Changed how emotes were placed into the leaderboard slightly
- Moved around TODO strings into proper files and added more.
- Corrected main.py cog loading references.
- Improved ContestBot.reject with message references and used built-in
delete_after keyword argument.
- Minor docstring/light formatting
Additionally, helper methods and new constants for Embed colors have
been added to simplify this process of sending messages with embeds.
Colors have been chosen, too.
Extra: The ContestCommandsCog has been given a
name kwarg for the 'help' command to display it better.
Implements the status command, creating a new Submission.permission_explanation
function in the process. Also changes the leaderboard command's embed
formatting slightly.
Since I'm not good at complex SQLAlchemy syntax and database querying
through SQL or the ORM, I'm simply using a descriptor to update the
count column everytime votes is modified.
expected_react_deletions and expected_msg_deletions were moved into bot
.py
There may be more edits included in this that I cannot see.
Added docstrings to get_message and fetch_message
Added and implemented helper functions for getting and fetching messages
given a payload's integer channel and message IDs.
Implemented Submission.votes list modifications and Submission.update in
code (tested with real bot)
Committed constants.py containing ReactionMarker used in models.py