| Commit message (Collapse) | Author | Age | Lines |
| |
|
|
|
|
|
|
|
| |
It is believed that this is now a more logical name for the package,
as extensions no longer bind to seasons.
Internally, packages are still grouped into seasonal sub-packages.
There are quite a few, and it makes sense to group them by a common
theme that inspired their functionality.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I left as many available as possible. Some of the commands also handle
being outside of their original season, e.g. by showing the amount of
time until Hacktoberfest begins, if not currently active. These were
left available as well.
If a group is to be locked, the `invoke_without_command` param must
be False (default), otherwise the group's callback will be circumvented
if a valid subcommand is invoked.
I adjusted these where necessary, except for the `HacktoberStats` cog,
whose cmd group takes an arg, which would require a more involved
adjustment - I decided to leave it as is, and instead manually lock
both subcommands.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Defining seasons in seasonal packages' __init__.py files made more
sense when extensions were strictly tied to seasons. It introduces an
annoying circular dependency where a seasonal package must be imported
in order for the __init__.py file to run and register the season, but
it also imports SeasonBase from the parent directory so that it can
inherit from it.
I have made the decision to scrap the seasonal __init__.py files, and
instead define all seasons directly under SeasonBase. The classes are
no longer scattered around, we remove the above mentioned import
problem, and everything is more transparent and easier to digest.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We no longer use the class docstrings for announcements, and they
mostly contain outdated information. Sentences still relevant are
used to populate the `description` attr (which shows in the branding
embed), the rest is scrapped.
The descriptions themselves can still be improved in the future, once
we figure out exactly in which direction we want to go with them.
The idea of providing a description for each season's branding was
originally brought up by neonsea, co-authored below.
Co-authored-by: Rasmus Moorats <[email protected]>
|
| |
|
|
|
|
| |
We'll use this to colour the branding embed, as it currently looks very
plain. Seasons can either provide their own, or just use the default
green.
|
| |
|
|
|
| |
Ensure that all inheriting seasons are now providing the right attrs
as defined in `SeasonBase`.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hooks added:
* check-merge-conflict - checks for files with merge conflict strings
* check-toml - attempts to load all toml files to verify syntax
* check-yaml - attempts to load all yaml files to verify syntax
* end-of-file-fixer - ensures files end in a newline and only a newline
* mixed-line-ending - replaces mixed line endings with LF
* trailing-whitespace - trims trailing whitespace
* python-check-blanket-noqa - enforces that noqa annotations always
occur with specific codes
Changes made to comply with new hooks:
* Remove trailing whitespaces
* Convert some CRLF files to LF
* Remove noqa and add missing type annotations
* Add missing newlines at end of files
See: python-discord/organisation#138
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Advent of Code cog has a subscription system that allows members
to subscribe to a daily notification indicating the puzzle for that
day has become available. However, we introduces a more stringent
role mentionability policy that meant that the mentions did not
actually ping the members subscribed.
To solve this, I've made sure that the bot unlocks the role before
making the announcement using the `unlock_role` context manager. This
also means the role is automatically unlocked after the message is
sent.
In addition, I noticed that Seasonalbot was consistently announcing
the puzzle about 0.5 seconds early. I've correct this by adding a
second to the sleep delay. In addition, the bot now verifies that the
puzzle is available using a small HEAD request. While this does send
a request to the AoC server, it prevents multiple users from sending
unnecessary requests by following our link before the puzzle is
actually available.
|
| |\
| |
| | |
Fix AOC countdown logic
|
| | |
| |
| |
| |
| |
| |
| |
| | |
The `SeasonBase.is_between_dates()` method assumes that the season's start and end dates are in the same year, which works for every season except for Christmas, since its end date is New Year's Day.
To fix this, the christmas.end() method has been overloaded to return the next year instead of the current year.
This does not affect checks made on 1 January of the next year, as the season's start date will guard against this.
|
| | |
| |
| |
| |
| | |
The current time delta until the next AOC event assumes that the next event is next year's. While this is was a safe assumption when written, since the command would not be available until the season is loaded on December 1st, it provides an incorrect answer if the season is loaded prior. The logic has been adjusted to return the closest December 1st that is not in the past.
The feedback string has also been adjusted to give hours remaining if we're less than a day away from the event starting.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |/
|
| |
Fix the `brief` argument for `.aoc join` to make its behaviour more obvious.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\ |
|
| | |\ |
|
| | | |
| | |
| | | |
Relint
|
| | |/
| |
| |
| | |
Bot root, seasons cog, easter cogs, evergreen cogs, halloween cogs
|
| | |
| |
| |
| | |
commands
|
| |/ |
|
| | |
|
| |\ |
|
| | |\ |
|
| | | |\ |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | | |
cuz ill add it when i make PR for easter
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | | |
and yellow for easter
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
1. Added doc strings.
2. Changes loging info in setup method
3. Moved the varibales outside class into the __init__()
|
| | | | |
| | | |
| | | |
| | | | |
next commit
|
| | | | | |
|
| | | |/
| |/|
| | |
| | |
| | |
| | | |
Utilize new ctx.send_help coro
Bump d.py minor version & relock
|
| |/ / |
|
| | | |
|
| |\|
| |
| |
| | |
Resolve merge conflicts
|
| | | |
|
| | |
| |
| | |
Per the contributor doc
|
| | |\ |
|
| | | |
| | |
| | | |
Mitigates recent breaking d.py changes
|