aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exceptions.py (unfollow)
Commit message (Collapse)AuthorLines
2020-03-26Deseasonify: extend `in_month` docGravatar kwzrd-0/+5
2020-03-25Deseasonify: add 'task' alias to daemon groupGravatar kwzrd-1/+1
Suggested by Scrags. Co-authored-by: scragly <[email protected]>
2020-03-24Deseasonify: remove outdated `devtest` channel constantGravatar kwzrd-2/+0
This channel no longer exists and creeps into error messages as #deleted-channel. Fixes: #335
2020-03-24Deseasonify: clean up `constants` moduleGravatar kwzrd-27/+45
Order config classes and constants alphabetically (within groups). Add missing classes to `__all__`, and style it as a vertical list. This will make it easier to maintain, and allows it to serve as a summary of the module's contents.
2020-03-24Deseasonify: move bookmark icon under `Icons` constantsGravatar kwzrd-8/+6
2020-03-24Deseasonify: use 't-dot' notation for type annotationsGravatar kwzrd-19/+19
The module is full of complicated annotations, and the full `typing` takes up annoyingly much visual space.
2020-03-24Deseasonify: re-lock seasonal listeners with new `in_month`Gravatar kwzrd-5/+5
2020-03-24Deseasonify: add generic `in_month` decoratorGravatar kwzrd-1/+34
See docstring for further details. This serves as a convenience wrapper around `in_month_command` and `in_month_listener` to allow a consistent API. Proposed by lemon. Co-authored-by: Leon Sandøy <[email protected]>
2020-03-24Deseasonify: rename `in_month` decoratorGravatar kwzrd-1/+1
Indicate that the decorator shall only be applied to commands. The `in_month` name will be used for a universal decorator that can season-lock both listeners and commands.
2020-03-24Deseasonify: mock expensive API calls in debug modeGravatar kwzrd-1/+17
The methods will pretend that the selected asset was uploaded successfully. This allows extensive testing of the branding manager without API abuse.
2020-03-23Deseasonify: add `mock_in_debug` decoratorGravatar kwzrd-1/+21
This should be very useful for testing. See docstring.
2020-03-23Deseasonify: abdicate responsibility to wait until bot is readyGravatar kwzrd-7/+7
The wrapper will no longer wait for the bot to be ready before it calls the wrapped function for the first time. If the function requires the bot's cache to be ready, it is responsible for awaiting the method itself. This removes the need to acquire a reference to the bot instance inside the decorator, which seems to be difficult to do cleanly. As Mark adds, this may in fact be safer as the bot may temporarily disconnect while the task is active, and awaiting the bot's ready status every time will prevent issues in such a situation. Co-authored-by: MarkKoz <[email protected]>
2020-03-23Deseasonify: remove `load_extensions` methodGravatar kwzrd-19/+1
This is unused and no longer necessary, as all extensions load only once: on start-up, in `__main__.py`.
2020-03-23Deseasonify: extend BrandingManager documentationGravatar kwzrd-11/+50
2020-03-23Deseasonify: use BrandingError for negative responsesGravatar kwzrd-22/+18
This allows more flat code as raising will short-circuit, plus we do not need to build negative response embeds manually.
2020-03-22Deseasonify: handle BrandingErrorGravatar kwzrd-0/+5