aboutsummaryrefslogtreecommitdiffstats
path: root/bot/seasons/christmas (follow)
Commit message (Collapse)AuthorAgeLines
* Deseasonify: rename `seasons` pkg to `exts`Gravatar kwzrd2020-03-28-858/+0
| | | | | | | | | 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.
* Deseasonify: move decorators module under utilsGravatar kwzrd2020-03-28-2/+2
|
* Deseasonify: season-lock commands where appropriateGravatar kwzrd2020-03-26-6/+9
| | | | | | | | | | | | | | | | 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.
* Deseasonify: define all seasons in one placeGravatar kwzrd2020-03-21-19/+0
| | | | | | | | | | | | | | 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.
* Deseasonify: turn legacy docstrings into attrsGravatar kwzrd2020-03-19-9/+5
| | | | | | | | | | | | | | | 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]>
* Deseasonify: add colour attr to seasonal classesGravatar kwzrd2020-03-19-1/+3
| | | | | | 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.
* Deseasonify: adjust inheriting seasons in accordance with new systemGravatar kwzrd2020-03-08-16/+4
| | | | | Ensure that all inheriting seasons are now providing the right attrs as defined in `SeasonBase`.
* Add more pre-commit hooksGravatar MarkKoz2020-03-04-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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
* Unlock AoC role to make announcements actually ping the usersGravatar Sebastiaan Zeeff2019-12-04-7/+34
| | | | | | | | | | | | | | | | | | | | | 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 (#317)Gravatar S. Co12019-12-02-3/+21
|\ | | | | Fix AOC countdown logic
| * Fix Christmas season loading bugGravatar sco12019-12-02-0/+7
| | | | | | | | | | | | | | | | 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.
| * Fix AOC countdown logicGravatar S. Co12019-11-30-3/+14
| | | | | | | | | | 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.
* | Add envelope reaction if AoC join DM sends successfullyGravatar kwzrd2019-12-02-0/+2
| |
* | Delete whitespacesGravatar Matteo Bertucci2019-12-02-1/+1
| |
* | Cancel season related tasks on cog unloadGravatar Matteo Bertucci2019-12-02-0/+5
| |
* | fix line length in command `.aoc join`Gravatar decorator-factory2019-12-01-1/+1
| |
* | Fix cmd annotationGravatar decorator-factory2019-12-01-1/+1
|/ | | Fix the `brief` argument for `.aoc join` to make its behaviour more obvious.
* Update icon path for 2019 festive seasonGravatar kwzrd2019-11-29-1/+1
|
* allow all AoC commands in whitelisted channelsGravatar Numerlor2019-10-12-0/+8
|
* limit Advent Of Code commands to global whitelist and the AoC channelGravatar Numerlor2019-10-03-2/+4
|
* call the rewritten override_in_channelGravatar Numerlor2019-10-02-1/+1
|
* Merge branch 'master' into date-fixGravatar Leon Sandøy2019-09-30-19/+22
|\
| * Merge branch 'master' into flake8-annotationsGravatar S. Co12019-09-11-1/+1
| |\
| | * Fix misconfigured flake8 so docstrings are properly lintedGravatar S. Co12019-09-05-1/+1
| | | | | | | | | Relint
| * | Initial linting passGravatar S. Co12019-09-09-18/+19
| |/ | | | | | | Bot root, seasons cog, easter cogs, evergreen cogs, halloween cogs
| * Implement error handling; add `in_channel` overrides to `!issue` and AoC ↵Gravatar kosayoda2019-08-06-0/+2
| | | | | | | | commands
* | Edit datesGravatar Suhail2019-06-30-1/+1
|/
* Changed all icon attributes to tuplesGravatar Suhail2019-06-22-1/+3
|
* Merge branch 'master' into docstring-lint-changeGravatar sco12019-05-28-3/+115
|\
| * Merge branch 'master' into pypi-dpyGravatar sco12019-05-11-2/+114
| |\
| | * Merge branch 'master' into hanukkah_embed_icemanGravatar scragly2019-05-11-73/+60
| | |\
| | | * Constants cleaningGravatar Suhail2019-04-23-2/+2
| | | |
| | * | not importing aiohttp nowGravatar Rohan2019-04-23-1/+0
| | | |
| | * | small changesGravatar Rohan2019-04-19-4/+0
| | | |
| | * | using aiohttpGravatar Rohan2019-04-09-11/+15
| | | |
| | * | added doc strings to setup function and removed yellow color from constants ↵Gravatar Rohan2019-03-31-0/+1
| | | | | | | | | | | | | | | | cuz ill add it when i make PR for easter
| | * | fixed lint errorsGravatar Rohan2019-03-31-1/+0
| | | |
| | * | fixed some linting and using colours from constants.pyGravatar Rohan2019-03-31-0/+1
| | | |
| | * | using the Colours from constants.py and added 2 colors - blue for christmas ↵Gravatar Rohan2019-03-31-17/+9
| | | | | | | | | | | | | | | | and yellow for easter
| | * | made the following changes:Gravatar Rohan2019-03-31-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | 1. Added doc strings. 2. Changes loging info in setup method 3. Moved the varibales outside class into the __init__()
| | * | added .py extension, add doc strings,other changes will be coming in the ↵Gravatar Rohan2019-03-31-5/+15
| | | | | | | | | | | | | | | | next commit
| | * | Hanukkah Embed fileGravatar Rohan2019-03-31-0/+110
| | | |
| * | | Fix broken help getter patternsGravatar sco12019-05-11-1/+1
| | |/ | |/| | | | | | | | | | | | | Utilize new ctx.send_help coro Bump d.py minor version & relock
* / | Relint Seasonalbot with new linting rulesGravatar sco12019-04-24-35/+3
|/ /
* | Re-add cog inheritance removed by poor merge conflict resolutionGravatar sco12019-03-30-1/+1
| |
* | Merge branch 'master' into flake8-docstringGravatar sco12019-03-26-1/+1
|\| | | | | | | Resolve merge conflicts
| * Adjust cog load logs to use cog class name.Gravatar scragly2019-03-26-1/+1
| |
| * Set cog load log messages to infoGravatar sco12019-03-05-1/+1
| | | | | | Per the contributor doc
| * Merge branch 'master' into dpy-cog-changesGravatar sco12019-03-05-2/+9
| |\
| * | Add new Cog class inheritance & event listener decorationGravatar sco12019-03-03-1/+1
| | | | | | | | | Mitigates recent breaking d.py changes