| Commit message (Collapse) | Author | Lines |
|
The previous system required each extension's `setup` func to log
that the cog was loaded. This leads to inconsistent messages all
trying to convey the same thing, variable logger names in the output
file are difficult to read, and several extensions were not logging
at all.
By logging directly in the `add_cog` method, we reduce code repetition,
ensure consistent format, and remove the responsibility to remember
that a log should be made.
|
|
Simplify internal structure & adjust var naming.
|
|
This simplifies the function and is more in-line with how the function
is being used.
|
|
To avoid confusion, the packages should no longer be referred to
as 'seasons'.
|
|
Since the original `seasons` package is now called just `exts`,
it makes sense to migrate all season-specific definitions out into
a separate module.
This module now contains everything relating to 'new' seasons, i.e.
just branding tooling.
|
|
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.
|
|
Keep it consistent with all other cogs.
|
|
|
|
|
|
|
|
|
|
|
|
As per Scrags' & Lemon's request, icon discovery will ignore directories
in the branding repo's `server_icons` directory, so that unused files
can be placed there without interfering with the bot's discovery
mechanism.
Co-authored-by: scragly <[email protected]>
Co-authored-by: Leon Sandøy <[email protected]>
|
|
Clean up the summary docstring lines such that they read better in
the automatically generated help embed.
Extend some of the docs so that they provide information that may
be useful to users unaware of the internal implementation.
|
|
Previously, when a group was called without a specific subcommand,
the status / info command was invoked automatically. This was
inconsistent with how other cogs behave, and makes it difficult
to discover the full API.
The logic from the `daemon` group is split off into a separate cmd
to allow this behaviour.
|
|
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.
|
|
|
|
|
|
Suggested by Scrags.
Co-authored-by: scragly <[email protected]>
|
|
This channel no longer exists and creeps into error messages
as #deleted-channel.
Fixes: #335
|
|
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.
|
|
|
|
The module is full of complicated annotations, and the full `typing`
takes up annoyingly much visual space.
|
|
|
|
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]>
|
|
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.
|
|
The methods will pretend that the selected asset was uploaded
successfully. This allows extensive testing of the branding manager
without API abuse.
|
|
This should be very useful for testing. See docstring.
|
|
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]>
|
|
This is unused and no longer necessary, as all extensions load only
once: on start-up, in `__main__.py`.
|
|
|
|
This allows more flat code as raising will short-circuit,
plus we do not need to build negative response embeds manually.
|
|
|