| Commit message (Collapse) | Author | Age | Lines |
|
|
|
|
|
| |
Adds a helper to find and escape links in a message.
Signed-off-by: Hassan Abouelela <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
Previously this would output all channels, and could result in an error.
This change ensures only the main bot channel & and any overridden channels
are shown in the embed. We do this before the categories block as
the categories kwarg itself is an override, so we want to include
those in any output.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Adds the channels within categories to the failure message of the
command whitelist check.
Signed-off-by: Hassan Abouelela <[email protected]>
|
| |
| |
| |
| |
| |
| |
| | |
Upgrades in channel check to support categories, and in the case of
overrides, roles too.
Signed-off-by: Hassan Abouelela <[email protected]>
|
|\| |
|
| |
| |
| |
| |
| | |
I've tried to replace this with generic references where appropriate,
but a lot of the time it just doesn't make a lot of sense to do so.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
[link] and [<link>] are also supported
|
| |
| |
| |
| |
| |
| | |
- Necessary for extensions.py to work
- Fully copied over from the 'Python' bot
|
| |
| |
| |
| |
| |
| | |
- Necessary for extensions.py to work
- Copied from the 'Python' bot, with minor tweaks to make it work with SeasonalBot
|
|/ |
|
|
|
| |
Co-authored-by: Dennis Pham <[email protected]>
|
| |
|
|
|
|
| |
This fixes a new lint error (F541) introduced by flake8 3.8.
|
| |
|
| |
|
|
|
|
| |
removed definition in extensions. Removed custom error handler.
|
|
|
|
|
|
|
|
| |
This way, we can standardize the way Months are shown to both the user
and the developer. Note that if passing a Month member to an f-string,
the `!s` format code must be specified to ensure our __str__ is used.
Co-authored-by: MarkKoz <[email protected]>
|
|
|
|
|
| |
The function is useful to other modules as well - not only decorators.
This declares it as public and moves it to a more accessible place.
|
|
|
|
| |
See docstring for details.
|
|
|
|
|
| |
To avoid confusion, the packages should no longer be referred to
as 'seasons'.
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, our regualar roles are not mentionable by default. This
means that features that rely on roles to keep track of users that
want to receive announcements, like the AoC Day Countdown, don't
actually ping the users subscribed to it. The solution is obviously
that the bot should unlock prior to making the announcement.
However, this is complicated by the fact that there needs to be a
sufficient delay. both between unlocking and sending the message
and between sending the message and locking the role again. If not,
Discord's not done synchronizing across all servers and some users
won't receive a ping.
To make this easier, I have implemented a context manager that takes
an instance of `discord.Role` and an optional `delay` (default: 5s)
that yields a context in which the role is unlocked. This context
manager also makes sure that the role is locked even if an exception
occured within the unlocked context.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Function name has been changed to `make_persistent` after prompt by @lemonsaurus
asking for a more descriptive name. Thanks @MarkKoz for providing the alternate
name.
During local testing, the `data` directory doesn't exist yet. In prod, this
isn't an issue as the persistent volume is mounted at that location. To make
local testing more convenient, the directory is checked and made if not found.
Persistent data files will be placed in a seasonal subdirectory so long as they
have a valid season name somewhere in their path, otherwise they will be placed
directly in the data directory.
Added a note to docstring to avoid same-named files in the same seasons or it
will conflict with each other in the persistent data directory.
The example was extended a little bit to make it both actually valid if tested
and hopefully make it easier to understand what's going on.
|
|
|
| |
Co-Authored-By: Mark <[email protected]>
|
| |
|
| |
|
| |
|
|
|
| |
hacktoberstats cog handled in separate PR
|
|\
| |
| | |
Modify text :-)
|
| | |
|
|/
|
|
| |
summary
|
| |
|
| |
|